199a2dd95SBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause 299a2dd95SBruce Richardson * Copyright(C) 2020 Marvell International Ltd. 399a2dd95SBruce Richardson */ 499a2dd95SBruce Richardson #ifndef __INCLUDE_ETHDEV_RX_PRIV_H__ 599a2dd95SBruce Richardson #define __INCLUDE_ETHDEV_RX_PRIV_H__ 699a2dd95SBruce Richardson 799a2dd95SBruce Richardson #include <rte_common.h> 899a2dd95SBruce Richardson 999a2dd95SBruce Richardson struct ethdev_rx_node_elem; 1099a2dd95SBruce Richardson struct ethdev_rx_node_ctx; 1199a2dd95SBruce Richardson typedef struct ethdev_rx_node_elem ethdev_rx_node_elem_t; 1299a2dd95SBruce Richardson typedef struct ethdev_rx_node_ctx ethdev_rx_node_ctx_t; 1399a2dd95SBruce Richardson 1499a2dd95SBruce Richardson /** 1599a2dd95SBruce Richardson * @internal 1699a2dd95SBruce Richardson * 1799a2dd95SBruce Richardson * Ethernet device Rx node context structure. 1899a2dd95SBruce Richardson */ 1999a2dd95SBruce Richardson struct ethdev_rx_node_ctx { 2099a2dd95SBruce Richardson uint16_t port_id; /**< Port identifier of the Rx node. */ 2199a2dd95SBruce Richardson uint16_t queue_id; /**< Queue identifier of the Rx node. */ 2299a2dd95SBruce Richardson uint16_t cls_next; 2399a2dd95SBruce Richardson }; 2499a2dd95SBruce Richardson 2599a2dd95SBruce Richardson /** 2699a2dd95SBruce Richardson * @internal 2799a2dd95SBruce Richardson * 2899a2dd95SBruce Richardson * Ethernet device Rx node list element structure. 2999a2dd95SBruce Richardson */ 3099a2dd95SBruce Richardson struct ethdev_rx_node_elem { 3199a2dd95SBruce Richardson struct ethdev_rx_node_elem *next; 3299a2dd95SBruce Richardson /**< Pointer to the next Rx node element. */ 3399a2dd95SBruce Richardson struct ethdev_rx_node_ctx ctx; 3499a2dd95SBruce Richardson /**< Rx node context. */ 3599a2dd95SBruce Richardson rte_node_t nid; 3699a2dd95SBruce Richardson /**< Node identifier of the Rx node. */ 3799a2dd95SBruce Richardson }; 3899a2dd95SBruce Richardson 3999a2dd95SBruce Richardson enum ethdev_rx_next_nodes { 4099a2dd95SBruce Richardson ETHDEV_RX_NEXT_IP4_LOOKUP, 4199a2dd95SBruce Richardson ETHDEV_RX_NEXT_PKT_CLS, 4299a2dd95SBruce Richardson ETHDEV_RX_NEXT_MAX, 4399a2dd95SBruce Richardson }; 4499a2dd95SBruce Richardson 4599a2dd95SBruce Richardson /** 4699a2dd95SBruce Richardson * @internal 4799a2dd95SBruce Richardson * 4899a2dd95SBruce Richardson * Ethernet Rx node main structure. 4999a2dd95SBruce Richardson */ 5099a2dd95SBruce Richardson struct ethdev_rx_node_main { 5199a2dd95SBruce Richardson ethdev_rx_node_elem_t *head; 5299a2dd95SBruce Richardson /**< Pointer to the head Rx node element. */ 5399a2dd95SBruce Richardson }; 5499a2dd95SBruce Richardson 5599a2dd95SBruce Richardson /** 5699a2dd95SBruce Richardson * @internal 5799a2dd95SBruce Richardson * 5899a2dd95SBruce Richardson * Get the Ethernet Rx node data. 5999a2dd95SBruce Richardson * 6099a2dd95SBruce Richardson * @return 6199a2dd95SBruce Richardson * Pointer to Ethernet Rx node data. 6299a2dd95SBruce Richardson */ 6399a2dd95SBruce Richardson struct ethdev_rx_node_main *ethdev_rx_get_node_data_get(void); 6499a2dd95SBruce Richardson 6599a2dd95SBruce Richardson /** 6699a2dd95SBruce Richardson * @internal 6799a2dd95SBruce Richardson * 6899a2dd95SBruce Richardson * Get the Ethernet Rx node. 6999a2dd95SBruce Richardson * 70*4a6672c2SStephen Hemminger * @return 7199a2dd95SBruce Richardson * Pointer to the Ethernet Rx node. 7299a2dd95SBruce Richardson */ 7399a2dd95SBruce Richardson struct rte_node_register *ethdev_rx_node_get(void); 7499a2dd95SBruce Richardson 7599a2dd95SBruce Richardson #endif /* __INCLUDE_ETHDEV_RX_PRIV_H__ */ 76