[dpdk-stable] patch 'net/af_xdp: fix zero-copy Tx queue drain' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:28:35 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/af6efb8cb21cb6115a3fa20001f979f7beb6c9e9

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From af6efb8cb21cb6115a3fa20001f979f7beb6c9e9 Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch at tkos.co.il>
Date: Wed, 25 Aug 2021 13:05:44 +0300
Subject: [PATCH] net/af_xdp: fix zero-copy Tx queue drain
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 0f2ffb49ce29351fad043377a6d2f144f3c52afb ]

Call xsk_ring_prod__submit() before kick_tx() so that the kernel
consumer sees the updated state of Tx ring. Otherwise, Tx packets are
stuck in the ring until the next call to af_xdp_tx_zc().

Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")

Signed-off-by: Baruch Siach <baruch at tkos.co.il>
Acked-by: Ciara Loftus <ciara.loftus at intel.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 3885fb7c78..312e424359 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -490,7 +490,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 
 			if (!xsk_ring_prod__reserve(&txq->tx, 1, &idx_tx)) {
 				rte_pktmbuf_free(local_mbuf);
-				kick_tx(txq, cq);
 				goto out;
 			}
 
@@ -514,10 +513,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		tx_bytes += mbuf->pkt_len;
 	}
 
-	kick_tx(txq, cq);
-
 out:
 	xsk_ring_prod__submit(&txq->tx, count);
+	kick_tx(txq, cq);
 
 	txq->stats.tx_pkts += count;
 	txq->stats.tx_bytes += tx_bytes;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.510109335 +0800
+++ 0031-net-af_xdp-fix-zero-copy-Tx-queue-drain.patch	2021-11-10 14:17:01.777413521 +0800
@@ -1 +1 @@
-From 0f2ffb49ce29351fad043377a6d2f144f3c52afb Mon Sep 17 00:00:00 2001
+From af6efb8cb21cb6115a3fa20001f979f7beb6c9e9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 0f2ffb49ce29351fad043377a6d2f144f3c52afb ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index 74ffa45112..9bea0a895a 100644
+index 3885fb7c78..312e424359 100644
@@ -23 +25 @@
-@@ -527,7 +527,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -490,7 +490,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -31 +33 @@
-@@ -551,10 +550,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -514,10 +513,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)


More information about the stable mailing list