199a2dd95SBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause 299a2dd95SBruce Richardson * Copyright(C) 2020 Marvell International Ltd. 399a2dd95SBruce Richardson */ 499a2dd95SBruce Richardson #ifndef __INCLUDE_ETHDEV_TX_PRIV_H__ 599a2dd95SBruce Richardson #define __INCLUDE_ETHDEV_TX_PRIV_H__ 699a2dd95SBruce Richardson 799a2dd95SBruce Richardson struct ethdev_tx_node_ctx; 899a2dd95SBruce Richardson typedef struct ethdev_tx_node_ctx ethdev_tx_node_ctx_t; 999a2dd95SBruce Richardson 1099a2dd95SBruce Richardson enum ethdev_tx_next_nodes { 1199a2dd95SBruce Richardson ETHDEV_TX_NEXT_PKT_DROP, 1299a2dd95SBruce Richardson ETHDEV_TX_NEXT_MAX, 1399a2dd95SBruce Richardson }; 1499a2dd95SBruce Richardson 1599a2dd95SBruce Richardson /** 1699a2dd95SBruce Richardson * @internal 1799a2dd95SBruce Richardson * 1899a2dd95SBruce Richardson * Ethernet Tx node context structure. 1999a2dd95SBruce Richardson */ 2099a2dd95SBruce Richardson struct ethdev_tx_node_ctx { 2199a2dd95SBruce Richardson uint16_t port; /**< Port identifier of the Ethernet Tx node. */ 2299a2dd95SBruce Richardson uint16_t queue; /**< Queue identifier of the Ethernet Tx node. */ 2399a2dd95SBruce Richardson }; 2499a2dd95SBruce Richardson 2599a2dd95SBruce Richardson /** 2699a2dd95SBruce Richardson * @internal 2799a2dd95SBruce Richardson * 2899a2dd95SBruce Richardson * Ethernet Tx node main structure. 2999a2dd95SBruce Richardson */ 3099a2dd95SBruce Richardson struct ethdev_tx_node_main { 3199a2dd95SBruce Richardson uint32_t nodes[RTE_MAX_ETHPORTS]; /**< Tx nodes for each ethdev port. */ 3299a2dd95SBruce Richardson }; 3399a2dd95SBruce Richardson 3499a2dd95SBruce Richardson /** 3599a2dd95SBruce Richardson * @internal 3699a2dd95SBruce Richardson * 3799a2dd95SBruce Richardson * Get the Ethernet Tx node data. 3899a2dd95SBruce Richardson * 3999a2dd95SBruce Richardson * @return 4099a2dd95SBruce Richardson * Pointer to Ethernet Tx node data. 4199a2dd95SBruce Richardson */ 4299a2dd95SBruce Richardson struct ethdev_tx_node_main *ethdev_tx_node_data_get(void); 4399a2dd95SBruce Richardson 4499a2dd95SBruce Richardson /** 4599a2dd95SBruce Richardson * @internal 4699a2dd95SBruce Richardson * 4799a2dd95SBruce Richardson * Get the Ethernet Tx node. 4899a2dd95SBruce Richardson * 49*4a6672c2SStephen Hemminger * @return 5099a2dd95SBruce Richardson * Pointer to the Ethernet Tx node. 5199a2dd95SBruce Richardson */ 5299a2dd95SBruce Richardson struct rte_node_register *ethdev_tx_node_get(void); 5399a2dd95SBruce Richardson 5499a2dd95SBruce Richardson #endif /* __INCLUDE_ETHDEV_TX_PRIV_H__ */ 55