2 * SPDX-License-Identifier: BSD-3-Clause
3 * Copyright 2016 Intel Corporation.
4 * Copyright 2017 Cavium, Inc.
10 #include <rte_mempool.h>
12 #include <rte_launch.h>
13 #include <rte_malloc.h>
14 #include <rte_random.h>
15 #include <rte_cycles.h>
16 #include <rte_ethdev.h>
17 #include <rte_eventdev.h>
18 #include <rte_event_eth_rx_adapter.h>
19 #include <rte_service.h>
20 #include <rte_service_component.h>
22 #define MAX_NUM_STAGES 8
24 #define MAX_NUM_CORE 64
30 } __rte_cache_aligned;
35 } __rte_cache_aligned;
37 struct fastpath_data {
40 uint32_t evdev_service_id;
41 uint32_t rxadptr_service_id;
45 unsigned int rx_core[MAX_NUM_CORE];
46 unsigned int tx_core[MAX_NUM_CORE];
47 unsigned int sched_core[MAX_NUM_CORE];
48 unsigned int worker_core[MAX_NUM_CORE];
49 struct rte_eth_dev_tx_buffer *tx_buf[RTE_MAX_ETHPORTS];
50 } __rte_cache_aligned;
53 unsigned int active_cores;
54 unsigned int num_workers;
56 unsigned int num_fids;
59 int enable_queue_priorities;
63 unsigned int num_stages;
64 unsigned int worker_cq_depth;
65 int16_t next_qid[MAX_NUM_STAGES+2];
66 int16_t qid[MAX_NUM_STAGES];
67 uint8_t rx_adapter_id;
70 struct cons_data cons_data;
72 struct fastpath_data *fdata;
73 struct config_data cdata;