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

Function pipeline_test_setup

dpdk/app/test-eventdev/test_pipeline_common.c:841–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

839}
840
841int
842pipeline_test_setup(struct evt_test *test, struct evt_options *opt)
843{
844 void *test_pipeline;
845
846 test_pipeline = rte_zmalloc_socket(test->name,
847 sizeof(struct test_pipeline), RTE_CACHE_LINE_SIZE,
848 opt->socket_id);
849 if (test_pipeline == NULL) {
850 evt_err("failed to allocate test_pipeline memory");
851 goto nomem;
852 }
853 test->test_priv = test_pipeline;
854
855 struct test_pipeline *t = evt_test_priv(test);
856
857 t->nb_workers = evt_nr_active_lcores(opt->wlcores);
858 t->outstand_pkts = opt->nb_pkts * evt_nr_active_lcores(opt->wlcores);
859 t->done = false;
860 t->nb_flows = opt->nb_flows;
861 t->result = EVT_TEST_FAILED;
862 t->opt = opt;
863 opt->prod_type = EVT_PROD_TYPE_ETH_RX_ADPTR;
864 memcpy(t->sched_type_list, opt->sched_type_list,
865 sizeof(opt->sched_type_list));
866 return 0;
867nomem:
868 return -ENOMEM;
869}
870
871void
872pipeline_test_destroy(struct evt_test *test, struct evt_options *opt)

Callers

nothing calls this directly

Calls 4

rte_zmalloc_socketFunction · 0.85
evt_test_privFunction · 0.85
evt_nr_active_lcoresFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected