xref: /dpdk/examples/l2fwd-event/l2fwd_poll.h (revision 7e06c0de1952d3109a5b0c4779d7e7d8059c9d78)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2019 Marvell International Ltd.
3  */
4 
5 #ifndef __L2FWD_POLL_H__
6 #define __L2FWD_POLL_H__
7 
8 #include "l2fwd_common.h"
9 
10 typedef void (*poll_main_loop_cb)(struct l2fwd_resources *rsrc);
11 
12 struct __rte_cache_aligned lcore_queue_conf {
13 	uint32_t rx_port_list[MAX_RX_QUEUE_PER_LCORE];
14 	uint32_t n_rx_port;
15 };
16 
17 struct l2fwd_poll_resources {
18 	poll_main_loop_cb poll_main_loop;
19 	struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
20 	struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE];
21 };
22 
23 void l2fwd_poll_resource_setup(struct l2fwd_resources *rsrc);
24 
25 #endif
26