xref: /dpdk/lib/node/ethdev_tx_priv.h (revision e5fb1a9698e7111473ca0980fdf6c0edb7acdf91)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2020 Marvell International Ltd.
3  */
4 #ifndef __INCLUDE_ETHDEV_TX_PRIV_H__
5 #define __INCLUDE_ETHDEV_TX_PRIV_H__
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
11 struct ethdev_tx_node_ctx;
12 typedef struct ethdev_tx_node_ctx ethdev_tx_node_ctx_t;
13 
14 enum ethdev_tx_next_nodes {
15 	ETHDEV_TX_NEXT_PKT_DROP,
16 	ETHDEV_TX_NEXT_MAX,
17 };
18 
19 /**
20  * @internal
21  *
22  * Ethernet Tx node context structure.
23  */
24 struct ethdev_tx_node_ctx {
25 	uint16_t port;	/**< Port identifier of the Ethernet Tx node. */
26 	uint16_t queue; /**< Queue identifier of the Ethernet Tx node. */
27 };
28 
29 /**
30  * @internal
31  *
32  * Ethernet Tx node main structure.
33  */
34 struct ethdev_tx_node_main {
35 	uint32_t nodes[RTE_MAX_ETHPORTS]; /**< Tx nodes for each ethdev port. */
36 };
37 
38 /**
39  * @internal
40  *
41  * Get the Ethernet Tx node data.
42  *
43  * @return
44  *   Pointer to Ethernet Tx node data.
45  */
46 struct ethdev_tx_node_main *ethdev_tx_node_data_get(void);
47 
48 /**
49  * @internal
50  *
51  * Get the Ethernet Tx node.
52  *
53  * @retrun
54  *   Pointer to the Ethernet Tx node.
55  */
56 struct rte_node_register *ethdev_tx_node_get(void);
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif /* __INCLUDE_ETHDEV_TX_PRIV_H__ */
63