[dpdk-dev] [PATCH] net/af_xdp: submit valid count to Tx queue
Xiaolong Ye
xiaolong.ye at intel.com
Wed Apr 10 12:53:27 CEST 2019
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.marchand at redhat.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye at 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
More information about the dev
mailing list