[dpdk-stable] patch 'net/netvsc: fix warning when VF is removed' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Jul 24 13:57:26 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.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 07/26/20. 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.

Thanks.

Luca Boccassi

---
>From 370b18ccd659b433b9ff7cde3ea7fd9eb800097b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Tue, 19 May 2020 09:52:27 -0700
Subject: [PATCH] net/netvsc: fix warning when VF is removed

[ upstream commit c6854a41266a962d1f013065db7828517b246fef ]

The code to unset owner of VF device was changing port to invalid
value before calling unset.

Fixes: 4a9efcddaddd ("net/netvsc: fix VF support with secondary process")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/netvsc/hn_vf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c
index 1261b2e2e..97333b502 100644
--- a/drivers/net/netvsc/hn_vf.c
+++ b/drivers/net/netvsc/hn_vf.c
@@ -127,12 +127,12 @@ static void hn_vf_remove(struct hn_data *hv)
 		/* Stop incoming packets from arriving on VF */
 		hn_nvs_set_datapath(hv, NVS_DATAPATH_SYNTHETIC);
 
+		/* Give back ownership */
+		rte_eth_dev_owner_unset(hv->vf_port, hv->owner.id);
+
 		/* Stop transmission over VF */
 		hv->vf_port = HN_INVALID_PORT;
 		rte_smp_wmb();
-
-		/* Give back ownership */
-		rte_eth_dev_owner_unset(hv->vf_port, hv->owner.id);
 	}
 	rte_spinlock_unlock(&hv->vf_lock);
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:48.912396938 +0100
+++ 0008-net-netvsc-fix-warning-when-VF-is-removed.patch	2020-07-24 12:53:48.155004000 +0100
@@ -1,13 +1,14 @@
-From c6854a41266a962d1f013065db7828517b246fef Mon Sep 17 00:00:00 2001
+From 370b18ccd659b433b9ff7cde3ea7fd9eb800097b Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen at networkplumber.org>
 Date: Tue, 19 May 2020 09:52:27 -0700
 Subject: [PATCH] net/netvsc: fix warning when VF is removed
 
+[ upstream commit c6854a41266a962d1f013065db7828517b246fef ]
+
 The code to unset owner of VF device was changing port to invalid
 value before calling unset.
 
 Fixes: 4a9efcddaddd ("net/netvsc: fix VF support with secondary process")
-Cc: stable at dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
 ---
@@ -15,24 +16,25 @@
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c
-index b7e3ba46b..a745c7c36 100644
+index 1261b2e2e..97333b502 100644
 --- a/drivers/net/netvsc/hn_vf.c
 +++ b/drivers/net/netvsc/hn_vf.c
-@@ -120,11 +120,11 @@ static void hn_vf_remove(struct hn_data *hv)
+@@ -127,12 +127,12 @@ static void hn_vf_remove(struct hn_data *hv)
  		/* Stop incoming packets from arriving on VF */
  		hn_nvs_set_datapath(hv, NVS_DATAPATH_SYNTHETIC);
  
--		/* Stop transmission over VF */
--		hv->vf_port = HN_INVALID_PORT;
--
- 		/* Give back ownership */
- 		rte_eth_dev_owner_unset(hv->vf_port, hv->owner.id);
++		/* Give back ownership */
++		rte_eth_dev_owner_unset(hv->vf_port, hv->owner.id);
 +
-+		/* Stop transmission over VF */
-+		hv->vf_port = HN_INVALID_PORT;
+ 		/* Stop transmission over VF */
+ 		hv->vf_port = HN_INVALID_PORT;
+ 		rte_smp_wmb();
+-
+-		/* Give back ownership */
+-		rte_eth_dev_owner_unset(hv->vf_port, hv->owner.id);
  	}
+ 	rte_spinlock_unlock(&hv->vf_lock);
  }
- 
 -- 
 2.20.1
 


More information about the stable mailing list