Since tx callback only picks mbufs that can be copied to the xdp desc, it should call xsk_ring_prod__submit with valid count other than nb_pkts.
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") Reported-by: David Marchand <david.march...@redhat.com> Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> --- drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 5cc643ce2..8c2ba5740 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -300,7 +300,7 @@ eth_af_xdp_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) rte_pktmbuf_free(mbuf); } - xsk_ring_prod__submit(&txq->tx, nb_pkts); + xsk_ring_prod__submit(&txq->tx, valid); kick_tx(txq); -- 2.17.1