1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(C) 2020 Marvell International Ltd. 3 */ 4 #ifndef __INCLUDE_ETHDEV_RX_PRIV_H__ 5 #define __INCLUDE_ETHDEV_RX_PRIV_H__ 6 7 #include <rte_common.h> 8 9 struct ethdev_rx_node_elem; 10 struct ethdev_rx_node_ctx; 11 typedef struct ethdev_rx_node_elem ethdev_rx_node_elem_t; 12 typedef struct ethdev_rx_node_ctx ethdev_rx_node_ctx_t; 13 14 /** 15 * @internal 16 * 17 * Ethernet device Rx node context structure. 18 */ 19 struct ethdev_rx_node_ctx { 20 uint16_t port_id; /**< Port identifier of the Rx node. */ 21 uint16_t queue_id; /**< Queue identifier of the Rx node. */ 22 uint16_t cls_next; 23 }; 24 25 /** 26 * @internal 27 * 28 * Ethernet device Rx node list element structure. 29 */ 30 struct ethdev_rx_node_elem { 31 struct ethdev_rx_node_elem *next; 32 /**< Pointer to the next Rx node element. */ 33 struct ethdev_rx_node_ctx ctx; 34 /**< Rx node context. */ 35 rte_node_t nid; 36 /**< Node identifier of the Rx node. */ 37 }; 38 39 enum ethdev_rx_next_nodes { 40 ETHDEV_RX_NEXT_IP4_LOOKUP, 41 ETHDEV_RX_NEXT_PKT_CLS, 42 ETHDEV_RX_NEXT_IP4_REASSEMBLY, 43 ETHDEV_RX_NEXT_MAX, 44 }; 45 46 /** 47 * @internal 48 * 49 * Ethernet Rx node main structure. 50 */ 51 struct ethdev_rx_node_main { 52 ethdev_rx_node_elem_t *head; 53 /**< Pointer to the head Rx node element. */ 54 }; 55 56 /** 57 * @internal 58 * 59 * Get the Ethernet Rx node data. 60 * 61 * @return 62 * Pointer to Ethernet Rx node data. 63 */ 64 struct ethdev_rx_node_main *ethdev_rx_get_node_data_get(void); 65 66 /** 67 * @internal 68 * 69 * Get the Ethernet Rx node. 70 * 71 * @return 72 * Pointer to the Ethernet Rx node. 73 */ 74 struct rte_node_register *ethdev_rx_node_get(void); 75 76 #endif /* __INCLUDE_ETHDEV_RX_PRIV_H__ */ 77