2 * SPDX-License-Identifier: BSD-3-Clause
3 * Copyright 2017 Cavium, Inc.
6 #ifndef _TEST_PIPELINE_COMMON_
7 #define _TEST_PIPELINE_COMMON_
13 #include <rte_cycles.h>
14 #include <rte_ethdev.h>
15 #include <rte_eventdev.h>
16 #include <rte_event_eth_rx_adapter.h>
17 #include <rte_lcore.h>
18 #include <rte_malloc.h>
19 #include <rte_mempool.h>
20 #include <rte_prefetch.h>
21 #include <rte_spinlock.h>
23 #include "evt_common.h"
24 #include "evt_options.h"
30 uint64_t processed_pkts;
33 struct test_pipeline *t;
34 } __rte_cache_aligned;
36 struct test_pipeline {
37 /* Don't change the offset of "done". Signal handler use this memory
38 * to terminate all lcores work.
43 enum evt_test_result result;
45 uint64_t outstand_pkts;
46 struct rte_mempool *pool;
47 struct worker_data worker[EVT_MAX_PORTS];
48 struct rte_eth_dev_tx_buffer *tx_buf[RTE_MAX_ETHPORTS];
49 rte_spinlock_t tx_lk[RTE_MAX_ETHPORTS];
50 struct evt_options *opt;
51 uint8_t sched_type_list[EVT_MAX_STAGES] __rte_cache_aligned;
52 } __rte_cache_aligned;
54 int pipeline_test_setup(struct evt_test *test, struct evt_options *opt);
55 int pipeline_mempool_setup(struct evt_test *test, struct evt_options *opt);
56 void pipeline_test_destroy(struct evt_test *test, struct evt_options *opt);
57 void pipeline_mempool_destroy(struct evt_test *test, struct evt_options *opt);
59 #endif /* _TEST_PIPELINE_COMMON_ */