* Sequence of operations for find existing EFD table * * - create table * - find existing table: hit * - find non-existing table: miss * */
| 215 | * |
| 216 | */ |
| 217 | static int test_efd_find_existing(void) |
| 218 | { |
| 219 | struct rte_efd_table *handle = NULL, *result = NULL; |
| 220 | |
| 221 | printf("Entering %s\n", __func__); |
| 222 | |
| 223 | /* Create EFD table. */ |
| 224 | handle = rte_efd_create("efd_find_existing", TABLE_SIZE, |
| 225 | sizeof(struct flow_key), |
| 226 | efd_get_all_sockets_bitmask(), test_socket_id); |
| 227 | TEST_ASSERT_NOT_NULL(handle, "Error creating the efd table\n"); |
| 228 | |
| 229 | /* Try to find existing EFD table */ |
| 230 | result = rte_efd_find_existing("efd_find_existing"); |
| 231 | TEST_ASSERT_EQUAL(result, handle, "could not find existing efd table"); |
| 232 | |
| 233 | /* Try to find non-existing EFD table */ |
| 234 | result = rte_efd_find_existing("efd_find_non_existing"); |
| 235 | TEST_ASSERT_NULL(result, "found table that shouldn't exist"); |
| 236 | |
| 237 | /* Cleanup. */ |
| 238 | rte_efd_free(handle); |
| 239 | |
| 240 | return 0; |
| 241 | } |
| 242 | |
| 243 | /* |
| 244 | * Sequence of operations for 5 keys |
no test coverage detected