[dpdk-stable] patch 'net/hns3: fix VF reset on mailbox failure' has been queued to stable release 19.11.7

Christian Ehrhardt christian.ehrhardt at canonical.com
Mon Feb 8 12:14:23 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.7

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 47f2ed5d5fb019e86e6955a638a7c19331d7d46e Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang at huawei.com>
Date: Wed, 3 Feb 2021 20:23:56 +0800
Subject: [PATCH] net/hns3: fix VF reset on mailbox failure

[ upstream commit ff81c6b7d053d19fa5d766de449e9a1a462661f5 ]

Currently, during the VF reset, the VF will send a MBX to inform
PF to reset it and the disable command bit will be set whether
the MBX is successful. Generally, multiple reset attempts are made
after a failure. However, because the command is disabled, all
subsequent reset will all fail.

This patch disable the command only after the MBX message is
successfully.

Fixes: 2790c6464725 ("net/hns3: support device reset")

Signed-off-by: Chengchang Tang <tangchengchang at huawei.com>
Signed-off-by: Lijun Ou <oulijun at huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index f7bd2b4672..09a8d31ff4 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1970,15 +1970,17 @@ static int
 hns3vf_prepare_reset(struct hns3_adapter *hns)
 {
 	struct hns3_hw *hw = &hns->hw;
-	int ret = 0;
+	int ret;
 
 	if (hw->reset.level == HNS3_VF_FUNC_RESET) {
 		ret = hns3_send_mbx_msg(hw, HNS3_MBX_RESET, 0, NULL,
 					0, true, NULL, 0);
+		if (ret)
+			return ret;
 	}
 	rte_atomic16_set(&hw->reset.disable_cmd, 1);
 
-	return ret;
+	return 0;
 }
 
 static int
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:29.958796357 +0100
+++ 0011-net-hns3-fix-VF-reset-on-mailbox-failure.patch	2021-02-08 12:04:29.543496793 +0100
@@ -1 +1 @@
-From ff81c6b7d053d19fa5d766de449e9a1a462661f5 Mon Sep 17 00:00:00 2001
+From 47f2ed5d5fb019e86e6955a638a7c19331d7d46e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff81c6b7d053d19fa5d766de449e9a1a462661f5 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 4f9da4a56c..a607bd3a91 100644
+index f7bd2b4672..09a8d31ff4 100644
@@ -28 +29 @@
-@@ -2404,15 +2404,17 @@ static int
+@@ -1970,15 +1970,17 @@ static int
@@ -41 +42 @@
- 	__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+ 	rte_atomic16_set(&hw->reset.disable_cmd, 1);


More information about the stable mailing list