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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 9 11:35:18 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.1

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/11/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/224a29f58811d1a81540275ed334e86dbe4cd518

Thanks.

Luca Boccassi

---
>From 224a29f58811d1a81540275ed334e86dbe4cd518 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 34603a4a30..22ee2f4000 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2376,15 +2376,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.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.728868872 +0000
+++ 0020-net-hns3-fix-VF-reset-on-mailbox-failure.patch	2021-02-09 10:34:57.914584081 +0000
@@ -1 +1 @@
-From ff81c6b7d053d19fa5d766de449e9a1a462661f5 Mon Sep 17 00:00:00 2001
+From 224a29f58811d1a81540275ed334e86dbe4cd518 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 34603a4a30..22ee2f4000 100644
@@ -28 +29 @@
-@@ -2404,15 +2404,17 @@ static int
+@@ -2376,15 +2376,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