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

Function test_setup

dpdk/app/test/test_reorder.c:488–514  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488static int
489test_setup(void)
490{
491 /* reorder buffer instance creation */
492 if (test_params->b == NULL) {
493 test_params->b = rte_reorder_create("PKT_RO1", rte_socket_id(),
494 REORDER_BUFFER_SIZE);
495 if (test_params->b == NULL) {
496 printf("%s: Error creating reorder buffer instance b\n",
497 __func__);
498 return -1;
499 }
500 } else
501 rte_reorder_reset(test_params->b);
502
503 /* mempool creation */
504 if (test_params->p == NULL) {
505 test_params->p = rte_pktmbuf_pool_create("RO_MBUF_POOL",
506 NUM_MBUFS, BURST, 0, RTE_MBUF_DEFAULT_BUF_SIZE,
507 rte_socket_id());
508 if (test_params->p == NULL) {
509 printf("%s: Error creating mempool\n", __func__);
510 return -1;
511 }
512 }
513 return 0;
514}
515
516static void
517test_teardown(void)

Callers

nothing calls this directly

Calls 5

rte_reorder_createFunction · 0.85
rte_socket_idFunction · 0.85
rte_reorder_resetFunction · 0.85
rte_pktmbuf_pool_createFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected