[dpdk-stable] patch 'net/hns3: fix VF alive notification after config restore' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Sat Jun 12 01:03:35 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.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 06/14/21. 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/8e72b7a2eef263261b09d36dd750a78a4e7cc09f

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 8e72b7a2eef263261b09d36dd750a78a4e7cc09f Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3 at huawei.com>
Date: Fri, 7 May 2021 17:08:17 +0800
Subject: [PATCH] net/hns3: fix VF alive notification after config restore
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit 9c552087dc81d95a0bdbfef1be796a0c9656acee ]

Currently in the VF reset scenario, the VF performs the set
alive operation before restoring the configuration completed,
which may cause the hardware to work in an abnormal state.

This patch fix this problem by set VF alive after restoring
the configuration is completed.

Fixes: a5475d61fa34 ("net/hns3: support VF")

Signed-off-by: Hongbo Zheng <zhenghongbo3 at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 235beea14d..d18313c330 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1759,12 +1759,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns)
 		goto err_init_hardware;
 	}
 
-	ret = hns3vf_set_alive(hw, true);
-	if (ret) {
-		PMD_INIT_LOG(ERR, "Failed to VF send alive to PF: %d", ret);
-		goto err_init_hardware;
-	}
-
 	return 0;
 
 err_init_hardware:
@@ -1856,6 +1850,12 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
 
 	hns3_set_default_rss_args(hw);
 
+	ret = hns3vf_set_alive(hw, true);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Failed to VF send alive to PF: %d", ret);
+		goto err_set_tc_queue;
+	}
+
 	return 0;
 
 err_set_tc_queue:
@@ -2559,6 +2559,13 @@ hns3vf_restore_conf(struct hns3_adapter *hns)
 		hns3_info(hw, "hns3vf dev restart successful!");
 	} else if (hw->adapter_state == HNS3_NIC_STOPPING)
 		hw->adapter_state = HNS3_NIC_CONFIGURED;
+
+	ret = hns3vf_set_alive(hw, true);
+	if (ret) {
+		hns3_err(hw, "failed to VF send alive to PF: %d", ret);
+		goto err_vlan_table;
+	}
+
 	return 0;
 
 err_vlan_table:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.697821400 +0800
+++ 0121-net-hns3-fix-VF-alive-notification-after-config-rest.patch	2021-06-12 06:53:56.520000000 +0800
@@ -1 +1 @@
-From 9c552087dc81d95a0bdbfef1be796a0c9656acee Mon Sep 17 00:00:00 2001
+From 8e72b7a2eef263261b09d36dd750a78a4e7cc09f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit 9c552087dc81d95a0bdbfef1be796a0c9656acee ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index 71f3f95877..536ed463ef 100644
+index 235beea14d..d18313c330 100644
@@ -26 +28 @@
-@@ -1891,12 +1891,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns)
+@@ -1759,12 +1759,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns)
@@ -39 +41 @@
-@@ -1995,6 +1989,12 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
+@@ -1856,6 +1850,12 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
@@ -41 +43 @@
- 	hns3_rss_set_default_args(hw);
+ 	hns3_set_default_rss_args(hw);
@@ -52 +54 @@
-@@ -2706,6 +2706,13 @@ hns3vf_restore_conf(struct hns3_adapter *hns)
+@@ -2559,6 +2559,13 @@ hns3vf_restore_conf(struct hns3_adapter *hns)


More information about the stable mailing list