patch 'net/iavf: fix VF reset' has been queued to stable release 21.11.2

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Jul 6 22:34:54 CEST 2022


Hi,

FYI, your patch has been queued to stable release 21.11.2

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/08/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/97e75c37b04de4cfb2fd7f73de1481ba7e062ae0

Thanks.

Luca Boccassi

---
>From 97e75c37b04de4cfb2fd7f73de1481ba7e062ae0 Mon Sep 17 00:00:00 2001
From: Yiding Zhou <yidingx.zhou at intel.com>
Date: Mon, 27 Jun 2022 15:22:32 +0800
Subject: [PATCH] net/iavf: fix VF reset

[ upstream commit 196f35f81c962a1eae3f63bd621dfd9ebbf9a926 ]

When the VF is in closed state, the vf_reset flag can not be reverted
if the VF is reset asynchronously. This prevents all virtchnl commands
from executing, causing subsequent calls to iavf_dev_reset() to fail.

So the vf_reset flag needs to be reverted even when VF is in closed state.

Fixes: 676d986b4b86 ("net/iavf: fix crash after VF reset failure")

Signed-off-by: Yiding Zhou <yidingx.zhou at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index c002d605b8..f835457e4f 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2634,8 +2634,10 @@ iavf_dev_close(struct rte_eth_dev *dev)
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
 
-	if (adapter->closed)
-		return 0;
+	if (adapter->closed) {
+		ret = 0;
+		goto out;
+	}
 
 	ret = iavf_dev_stop(dev);
 	adapter->closed = true;
@@ -2695,6 +2697,7 @@ iavf_dev_close(struct rte_eth_dev *dev)
 	 * the bus master bit will not be disabled, and this call will have no
 	 * effect.
 	 */
+out:
 	if (vf->vf_reset && !rte_pci_set_bus_master(pci_dev, true))
 		vf->vf_reset = false;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-06 21:07:54.212053889 +0100
+++ 0019-net-iavf-fix-VF-reset.patch	2022-07-06 21:07:53.551518861 +0100
@@ -1 +1 @@
-From 196f35f81c962a1eae3f63bd621dfd9ebbf9a926 Mon Sep 17 00:00:00 2001
+From 97e75c37b04de4cfb2fd7f73de1481ba7e062ae0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 196f35f81c962a1eae3f63bd621dfd9ebbf9a926 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index 7df0bf8118..506fcff6e3 100644
+index c002d605b8..f835457e4f 100644
@@ -25 +26 @@
-@@ -2702,8 +2702,10 @@ iavf_dev_close(struct rte_eth_dev *dev)
+@@ -2634,8 +2634,10 @@ iavf_dev_close(struct rte_eth_dev *dev)
@@ -38 +39 @@
-@@ -2763,6 +2765,7 @@ iavf_dev_close(struct rte_eth_dev *dev)
+@@ -2695,6 +2697,7 @@ iavf_dev_close(struct rte_eth_dev *dev)


More information about the stable mailing list