[dpdk-stable] patch 'net/hns3: fix triggering reset procedure in slave process' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 11 12:20:29 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.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/13/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 9da2ae2be7afc47b6b5ccbcf6a79ee93a15a440f Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Thu, 9 Jan 2020 11:15:59 +0800
Subject: [PATCH] net/hns3: fix triggering reset procedure in slave process

[ upstream commit a1f381ad5349af335bda4b7152b7c6fd5f56573a ]

Currently, reset related operations can only be performed in the primary
process and are not allowed in the slave process in hns3 PMD driver.

In the internal function interface named hns3_cmd_send used for
communication between driver and firmware, if the wrong head value is
detected in the static subfunction hns3_cmd_csq_clean, driver will
trigger a function level reset to make the hardware work normally again.

This patch adds check condition to prevent triggering reset procedure in
the slave process to avoid failure.

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

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
---
 drivers/net/hns3/hns3_cmd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index 65a5af8e4f..5ec3dfe016 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -215,12 +215,12 @@ hns3_cmd_csq_clean(struct hns3_hw *hw)
 	head = hns3_read_dev(hw, HNS3_CMDQ_TX_HEAD_REG);
 
 	if (!is_valid_csq_clean_head(csq, head)) {
-		struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 		hns3_err(hw, "wrong cmd head (%u, %u-%u)", head,
 			    csq->next_to_use, csq->next_to_clean);
-		rte_atomic16_set(&hw->reset.disable_cmd, 1);
-
-		hns3_schedule_delayed_reset(hns);
+		if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+			rte_atomic16_set(&hw->reset.disable_cmd, 1);
+			hns3_schedule_delayed_reset(HNS3_DEV_HW_TO_ADAPTER(hw));
+		}
 
 		return -EIO;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-11 11:17:41.840127874 +0000
+++ 0083-net-hns3-fix-triggering-reset-procedure-in-slave-pro.patch	2020-02-11 11:17:38.520003591 +0000
@@ -1,8 +1,10 @@
-From a1f381ad5349af335bda4b7152b7c6fd5f56573a Mon Sep 17 00:00:00 2001
+From 9da2ae2be7afc47b6b5ccbcf6a79ee93a15a440f Mon Sep 17 00:00:00 2001
 From: Chengwen Feng <fengchengwen at huawei.com>
 Date: Thu, 9 Jan 2020 11:15:59 +0800
 Subject: [PATCH] net/hns3: fix triggering reset procedure in slave process
 
+[ upstream commit a1f381ad5349af335bda4b7152b7c6fd5f56573a ]
+
 Currently, reset related operations can only be performed in the primary
 process and are not allowed in the slave process in hns3 PMD driver.
 
@@ -15,7 +17,6 @@
 the slave process to avoid failure.
 
 Fixes: 2790c6464725 ("net/hns3: support device reset")
-Cc: stable at dpdk.org
 
 Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>


More information about the stable mailing list