numam-dpdk/lib/librte_node/ethdev_tx_priv.h
Nithin Dabilpuram 77edede86f node: add ethdev Tx
Add rte_node ethdev_tx process function and register it to
graph infra. This node has a specific (port, tx-queue) as context
and it enqueue's all the packets received to that specific queue pair.
When rte_eth_tx_burst() i.e enqueue to queue pair fails, packets
are forwarded to pkt_drop node to be free'd.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2020-05-05 23:38:31 +02:00

63 lines
1.1 KiB
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(C) 2020 Marvell International Ltd.
*/
#ifndef __INCLUDE_ETHDEV_TX_PRIV_H__
#define __INCLUDE_ETHDEV_TX_PRIV_H__
#ifdef __cplusplus
extern "C" {
#endif
struct ethdev_tx_node_ctx;
typedef struct ethdev_tx_node_ctx ethdev_tx_node_ctx_t;
enum ethdev_tx_next_nodes {
ETHDEV_TX_NEXT_PKT_DROP,
ETHDEV_TX_NEXT_MAX,
};
/**
* @internal
*
* Ethernet Tx node context structure.
*/
struct ethdev_tx_node_ctx {
uint16_t port; /**< Port identifier of the Ethernet Tx node. */
uint16_t queue; /**< Queue identifier of the Ethernet Tx node. */
};
/**
* @internal
*
* Ethernet Tx node main structure.
*/
struct ethdev_tx_node_main {
uint32_t nodes[RTE_MAX_ETHPORTS]; /**< Tx nodes for each ethdev port. */
};
/**
* @internal
*
* Get the Ethernet Tx node data.
*
* @return
* Pointer to Ethernet Tx node data.
*/
struct ethdev_tx_node_main *ethdev_tx_node_data_get(void);
/**
* @internal
*
* Get the Ethernet Tx node.
*
* @retrun
* Pointer to the Ethernet Tx node.
*/
struct rte_node_register *ethdev_tx_node_get(void);
#ifdef __cplusplus
}
#endif
#endif /* __INCLUDE_ETHDEV_TX_PRIV_H__ */