5b2655a693
This node classifies pkts based on packet type and sends them to appropriate next node. This is node helps in distribution of packets from ethdev_rx node to different next node with a constant overhead for all packet types. Currently all except non fragmented IPV4 packets are marked to be sent to "pkt_drop" node. Performance difference on ARM64 Octeontx2 is -4.9% due to addition of new node in the path. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
84 lines
1.6 KiB
C
84 lines
1.6 KiB
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright(C) 2020 Marvell International Ltd.
|
|
*/
|
|
#ifndef __INCLUDE_ETHDEV_RX_PRIV_H__
|
|
#define __INCLUDE_ETHDEV_RX_PRIV_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <rte_common.h>
|
|
|
|
struct ethdev_rx_node_elem;
|
|
struct ethdev_rx_node_ctx;
|
|
typedef struct ethdev_rx_node_elem ethdev_rx_node_elem_t;
|
|
typedef struct ethdev_rx_node_ctx ethdev_rx_node_ctx_t;
|
|
|
|
/**
|
|
* @internal
|
|
*
|
|
* Ethernet device Rx node context structure.
|
|
*/
|
|
struct ethdev_rx_node_ctx {
|
|
uint16_t port_id; /**< Port identifier of the Rx node. */
|
|
uint16_t queue_id; /**< Queue identifier of the Rx node. */
|
|
uint16_t cls_next;
|
|
};
|
|
|
|
/**
|
|
* @internal
|
|
*
|
|
* Ethernet device Rx node list element structure.
|
|
*/
|
|
struct ethdev_rx_node_elem {
|
|
struct ethdev_rx_node_elem *next;
|
|
/**< Pointer to the next Rx node element. */
|
|
struct ethdev_rx_node_ctx ctx;
|
|
/**< Rx node context. */
|
|
rte_node_t nid;
|
|
/**< Node identifier of the Rx node. */
|
|
};
|
|
|
|
enum ethdev_rx_next_nodes {
|
|
ETHDEV_RX_NEXT_IP4_LOOKUP,
|
|
ETHDEV_RX_NEXT_PKT_CLS,
|
|
ETHDEV_RX_NEXT_MAX,
|
|
};
|
|
|
|
/**
|
|
* @internal
|
|
*
|
|
* Ethernet Rx node main structure.
|
|
*/
|
|
struct ethdev_rx_node_main {
|
|
ethdev_rx_node_elem_t *head;
|
|
/**< Pointer to the head Rx node element. */
|
|
};
|
|
|
|
/**
|
|
* @internal
|
|
*
|
|
* Get the Ethernet Rx node data.
|
|
*
|
|
* @return
|
|
* Pointer to Ethernet Rx node data.
|
|
*/
|
|
struct ethdev_rx_node_main *ethdev_rx_get_node_data_get(void);
|
|
|
|
/**
|
|
* @internal
|
|
*
|
|
* Get the Ethernet Rx node.
|
|
*
|
|
* @retrun
|
|
* Pointer to the Ethernet Rx node.
|
|
*/
|
|
struct rte_node_register *ethdev_rx_node_get(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __INCLUDE_ETHDEV_RX_PRIV_H__ */
|