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

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Thu Jul 7 09:54:43 CEST 2022


Hi,

FYI, your patch has been queued to stable release 19.11.13

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/876ff3ffd902e0fc6d32d38367a2272a86ca25c7

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 876ff3ffd902e0fc6d32d38367a2272a86ca25c7 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

[ 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 583a8be760..3cb02bd1fb 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -433,28 +433,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.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.212614005 +0200
+++ 0048-net-iavf-fix-queue-start-exception-handling.patch	2022-07-07 09:54:10.937824444 +0200
@@ -1 +1 @@
-From 1fa739c3f2b3876d21e506c024a3c6bee6562943 Mon Sep 17 00:00:00 2001
+From 876ff3ffd902e0fc6d32d38367a2272a86ca25c7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1fa739c3f2b3876d21e506c024a3c6bee6562943 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 198d8299af..315ab15aad 100644
+index 583a8be760..3cb02bd1fb 100644
@@ -22 +23 @@
-@@ -926,28 +926,38 @@ iavf_start_queues(struct rte_eth_dev *dev)
+@@ -433,28 +433,38 @@ iavf_start_queues(struct rte_eth_dev *dev)


More information about the stable mailing list