patch 'net/iavf: fix Tx done descriptors cleanup' has been queued to stable release 21.11.3

Kevin Traynor ktraynor at redhat.com
Tue Oct 25 17:06:41 CEST 2022


Hi,

FYI, your patch has been queued to stable release 21.11.3

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/01/22. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/30fc18b4dc9f055ab2651e9cffd73e0a57d94a69

Thanks.

Kevin

---
>From 30fc18b4dc9f055ab2651e9cffd73e0a57d94a69 Mon Sep 17 00:00:00 2001
From: Aleksandr Miloshenko <a.miloshenko at f5.com>
Date: Mon, 29 Aug 2022 18:13:46 -0700
Subject: [PATCH] net/iavf: fix Tx done descriptors cleanup

[ upstream commit 4e868408bf213dc92ac270bc06ac466ed81a8505 ]

iavf_xmit_pkts() sets tx_tail to the next of last transmitted
Tx descriptor. So the cleanup of Tx done descriptors must be started
from tx_tail, not from the next of tx_tail.
Otherwise rte_eth_tx_done_cleanup() doesn't free the first Tx done mbuf
when tx queue is full.

Fixes: 86e44244f95c ("net/iavf: cleanup Tx buffers")

Signed-off-by: Aleksandr Miloshenko <a.miloshenko at f5.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 285aeebff6..afe5981cac 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -3061,12 +3061,12 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
 {
 	struct iavf_tx_entry *swr_ring = txq->sw_ring;
-	uint16_t i, tx_last, tx_id;
+	uint16_t tx_last, tx_id;
 	uint16_t nb_tx_free_last;
 	uint16_t nb_tx_to_clean;
-	uint32_t pkt_cnt;
+	uint32_t pkt_cnt = 0;
 
-	/* Start free mbuf from the next of tx_tail */
-	tx_last = txq->tx_tail;
-	tx_id  = swr_ring[tx_last].next_id;
+	/* Start free mbuf from tx_tail */
+	tx_id = txq->tx_tail;
+	tx_last = tx_id;
 
 	if (txq->nb_free == 0 && iavf_xmit_cleanup(txq))
@@ -3081,8 +3081,6 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
 	 * freeable mubfs and packets.
 	 */
-	for (pkt_cnt = 0; pkt_cnt < free_cnt; ) {
-		for (i = 0; i < nb_tx_to_clean &&
-			pkt_cnt < free_cnt &&
-			tx_id != tx_last; i++) {
+	while (pkt_cnt < free_cnt) {
+		do {
 			if (swr_ring[tx_id].mbuf != NULL) {
 				rte_pktmbuf_free_seg(swr_ring[tx_id].mbuf);
@@ -3097,5 +3095,5 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
 
 			tx_id = swr_ring[tx_id].next_id;
-		}
+		} while (--nb_tx_to_clean && pkt_cnt < free_cnt && tx_id != tx_last);
 
 		if (txq->rs_thresh > txq->nb_tx_desc -
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.576325016 +0100
+++ 0046-net-iavf-fix-Tx-done-descriptors-cleanup.patch	2022-10-25 14:18:58.410798088 +0100
@@ -1 +1 @@
-From 4e868408bf213dc92ac270bc06ac466ed81a8505 Mon Sep 17 00:00:00 2001
+From 30fc18b4dc9f055ab2651e9cffd73e0a57d94a69 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e868408bf213dc92ac270bc06ac466ed81a8505 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index dfd021889e..3deabe1d7e 100644
+index 285aeebff6..afe5981cac 100644
@@ -25 +26 @@
-@@ -3187,12 +3187,12 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
+@@ -3061,12 +3061,12 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
@@ -43 +44 @@
-@@ -3207,8 +3207,6 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
+@@ -3081,8 +3081,6 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
@@ -54 +55 @@
-@@ -3223,5 +3221,5 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,
+@@ -3097,5 +3095,5 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq,



More information about the stable mailing list