| 839 | } |
| 840 | |
| 841 | int |
| 842 | pipeline_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; |
| 867 | nomem: |
| 868 | return -ENOMEM; |
| 869 | } |
| 870 | |
| 871 | void |
| 872 | pipeline_test_destroy(struct evt_test *test, struct evt_options *opt) |
nothing calls this directly
no test coverage detected