[dpdk-dev] A question about (poor) rte_ethdev internal rx/tx callbacks design

Ilya Matveychikov matvejchikov at gmail.com
Sat Nov 11 18:18:45 CET 2017


Folks,

Are you serious with it:

typedef uint16_t (*eth_rx_burst_t)(void *rxq,
				   struct rte_mbuf **rx_pkts,
				   uint16_t nb_pkts);
typedef uint16_t (*eth_tx_burst_t)(void *txq,
				   struct rte_mbuf **tx_pkts,
				   uint16_t nb_pkts);

I’m not surprised that every PMD stores port_id in every and each queue as having just the queue as an argument doesn’t allow to get the device. So the question is - why not to use something like:

typedef uint16_t (*eth_rx_burst_t)(void *dev, uint16_t queue_id,
				   struct rte_mbuf **rx_pkts,
				   uint16_t nb_pkts);
typedef uint16_t (*eth_tx_burst_t)(void *dev, uint16_t queue_id,
				   struct rte_mbuf **tx_pkts,
				   uint16_t nb_pkts);

Ilya.



More information about the dev mailing list