xref: /dpdk/app/graph/ethdev_rx.h (revision 0efea35a2bb0ae9df6e204151c7f96b5eb93e130)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2023 Marvell.
3  */
4 
5 #ifndef APP_GRAPH_ETHDEV_RX_H
6 #define APP_GRAPH_ETHDEV_RX_H
7 
8 #include <rte_graph.h>
9 #include <rte_node_eth_api.h>
10 
11 #define ETHDEV_RX_LCORE_PARAMS_MAX 1024
12 #define ETHDEV_RX_QUEUE_PER_LCORE_MAX 16
13 
14 struct lcore_rx_queue {
15 	uint16_t port_id;
16 	uint8_t queue_id;
17 	char node_name[RTE_NODE_NAMESIZE];
18 };
19 
20 struct __rte_cache_aligned lcore_conf {
21 	uint16_t n_rx_queue;
22 	struct lcore_rx_queue rx_queue_list[ETHDEV_RX_QUEUE_PER_LCORE_MAX];
23 	struct rte_graph *graph;
24 	char name[RTE_GRAPH_NAMESIZE];
25 	rte_graph_t graph_id;
26 };
27 
28 uint8_t ethdev_rx_num_rx_queues_get(uint16_t port);
29 
30 extern struct rte_node_ethdev_config ethdev_conf[RTE_MAX_ETHPORTS];
31 extern struct lcore_conf lcore_conf[RTE_MAX_LCORE];
32 extern struct lcore_params *lcore_params;
33 extern uint16_t nb_lcore_params;
34 
35 #endif
36