2 * SPDX-License-Identifier: BSD-3-Clause
3 * Copyright 2017 Cavium, Inc.
6 #include "test_pipeline_common.h"
9 pipeline_test_setup(struct evt_test *test, struct evt_options *opt)
13 test_pipeline = rte_zmalloc_socket(test->name,
14 sizeof(struct test_pipeline), RTE_CACHE_LINE_SIZE,
16 if (test_pipeline == NULL) {
17 evt_err("failed to allocate test_pipeline memory");
20 test->test_priv = test_pipeline;
22 struct test_pipeline *t = evt_test_priv(test);
24 t->nb_workers = evt_nr_active_lcores(opt->wlcores);
25 t->outstand_pkts = opt->nb_pkts * evt_nr_active_lcores(opt->wlcores);
27 t->nb_flows = opt->nb_flows;
28 t->result = EVT_TEST_FAILED;
30 opt->prod_type = EVT_PROD_TYPE_ETH_RX_ADPTR;
31 memcpy(t->sched_type_list, opt->sched_type_list,
32 sizeof(opt->sched_type_list));
39 pipeline_test_destroy(struct evt_test *test, struct evt_options *opt)
43 rte_free(test->test_priv);