patch 'net/iavf: fix queue start exception handling' has been queued to stable release 20.11.6

Xueming Li xuemingl at nvidia.com
Tue Jun 21 10:02:44 CEST 2022


Hi,

FYI, your patch has been queued to stable release 20.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/23/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/steevenlee/dpdk

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

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 755ea301dbaa6a3b50d3c64407483f716538358e Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang at intel.com>
Date: Thu, 19 May 2022 05:01:56 +0000
Subject: [PATCH] net/iavf: fix queue start exception handling
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 1fa739c3f2b3876d21e506c024a3c6bee6562943 ]

If any queue start fail during dev_start, all started queues
should be stopped.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Qiming Yang <qiming.yang at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 3397d87e8a..bbbd7e84a4 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -634,28 +634,38 @@ iavf_start_queues(struct rte_eth_dev *dev)
 	struct iavf_rx_queue *rxq;
 	struct iavf_tx_queue *txq;
 	int i;
+	uint16_t nb_txq, nb_rxq;
 
-	for (i = 0; i < dev->data->nb_tx_queues; i++) {
-		txq = dev->data->tx_queues[i];
+	for (nb_txq = 0; nb_txq < dev->data->nb_tx_queues; nb_txq++) {
+		txq = dev->data->tx_queues[nb_txq];
 		if (txq->tx_deferred_start)
 			continue;
-		if (iavf_dev_tx_queue_start(dev, i) != 0) {
-			PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
-			return -1;
+		if (iavf_dev_tx_queue_start(dev, nb_txq) != 0) {
+			PMD_DRV_LOG(ERR, "Fail to start tx queue %u", nb_txq);
+			goto tx_err;
 		}
 	}
 
-	for (i = 0; i < dev->data->nb_rx_queues; i++) {
-		rxq = dev->data->rx_queues[i];
+	for (nb_rxq = 0; nb_rxq < dev->data->nb_rx_queues; nb_rxq++) {
+		rxq = dev->data->rx_queues[nb_rxq];
 		if (rxq->rx_deferred_start)
 			continue;
-		if (iavf_dev_rx_queue_start(dev, i) != 0) {
-			PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
-			return -1;
+		if (iavf_dev_rx_queue_start(dev, nb_rxq) != 0) {
+			PMD_DRV_LOG(ERR, "Fail to start rx queue %u", nb_rxq);
+			goto rx_err;
 		}
 	}
 
 	return 0;
+
+rx_err:
+	for (i = 0; i < nb_rxq; i++)
+		iavf_dev_rx_queue_stop(dev, i);
+tx_err:
+	for (i = 0; i < nb_txq; i++)
+		iavf_dev_tx_queue_stop(dev, i);
+
+	return -1;
 }
 
 static int
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.616390842 +0800
+++ 0098-net-iavf-fix-queue-start-exception-handling.patch	2022-06-21 15:37:49.207785188 +0800
@@ -1 +1 @@
-From 1fa739c3f2b3876d21e506c024a3c6bee6562943 Mon Sep 17 00:00:00 2001
+From 755ea301dbaa6a3b50d3c64407483f716538358e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 1fa739c3f2b3876d21e506c024a3c6bee6562943 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index 198d8299af..315ab15aad 100644
+index 3397d87e8a..bbbd7e84a4 100644
@@ -22 +24 @@
-@@ -926,28 +926,38 @@ iavf_start_queues(struct rte_eth_dev *dev)
+@@ -634,28 +634,38 @@ iavf_start_queues(struct rte_eth_dev *dev)


More information about the stable mailing list