MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_efd_find_existing

Function test_efd_find_existing

dpdk/app/test/test_efd.c:217–241  ·  view source on GitHub ↗

* Sequence of operations for find existing EFD table * * - create table * - find existing table: hit * - find non-existing table: miss * */

Source from the content-addressed store, hash-verified

215 *
216 */
217static 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

Callers 1

test_efdFunction · 0.85

Calls 5

rte_efd_createFunction · 0.85
rte_efd_find_existingFunction · 0.85
rte_efd_freeFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected