patch 'net/hns3: remove reset log in secondary' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:10:47 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.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 12/13/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=290166c239c0d88a2cf77bce9e58543ed98bb7a7

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 290166c239c0d88a2cf77bce9e58543ed98bb7a7 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui at huawei.com>
Date: Fri, 27 Oct 2023 14:09:43 +0800
Subject: [PATCH] net/hns3: remove reset log in secondary
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 5394df455749f60614a19d791d1d73c26b74dea1 ]

The reset event is checked and done in primary. And the secondary
doesn't check and display reset log. There is a patch to remove the
check code for secondary. please see commit a8f1f7cf1b42 ("net/hns3:
fix crash when secondary process access FW")

This patch removes the redundant log print of reset.

Fixes: a8f1f7cf1b42 ("net/hns3: fix crash when secondary process access FW")

Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 11 +++++------
 drivers/net/hns3/hns3_ethdev_vf.c | 11 +++++------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index b9a848540b..feabedc458 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5546,14 +5546,13 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
 	enum hns3_reset_level reset;
 
 	/*
-	 * Check the registers to confirm whether there is reset pending.
-	 * Note: This check may lead to schedule reset task, but only primary
-	 *       process can process the reset event. Therefore, limit the
-	 *       checking under only primary process.
+	 * Only primary can process can process the reset event,
+	 * so don't check reset event in secondary.
 	 */
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-		hns3_check_event_cause(hns, NULL);
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return false;
 
+	hns3_check_event_cause(hns, NULL);
 	reset = hns3_get_reset_level(hns, &hw->reset.pending);
 	if (reset != HNS3_NONE_RESET && hw->reset.level != HNS3_NONE_RESET &&
 	    hw->reset.level < reset) {
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index ad0ccb82fe..3874148815 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1796,14 +1796,13 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
 		return false;
 
 	/*
-	 * Check the registers to confirm whether there is reset pending.
-	 * Note: This check may lead to schedule reset task, but only primary
-	 *       process can process the reset event. Therefore, limit the
-	 *       checking under only primary process.
+	 * Only primary can process can process the reset event,
+	 * so don't check reset event in secondary.
 	 */
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-		hns3vf_check_event_cause(hns, NULL);
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return false;
 
+	hns3vf_check_event_cause(hns, NULL);
 	reset = hns3vf_get_reset_level(hw, &hw->reset.pending);
 	if (hw->reset.level != HNS3_NONE_RESET && reset != HNS3_NONE_RESET &&
 	    hw->reset.level < reset) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:23.896839400 +0800
+++ 0022-net-hns3-remove-reset-log-in-secondary.patch	2023-12-11 17:56:22.917652300 +0800
@@ -1 +1 @@
-From 5394df455749f60614a19d791d1d73c26b74dea1 Mon Sep 17 00:00:00 2001
+From 290166c239c0d88a2cf77bce9e58543ed98bb7a7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 5394df455749f60614a19d791d1d73c26b74dea1 ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index 964f47f164..3bdce1fa4b 100644
+index b9a848540b..feabedc458 100644
@@ -26 +28 @@
-@@ -5512,14 +5512,13 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
+@@ -5546,14 +5546,13 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
@@ -47 +49 @@
-index 007f5d619f..5f3422d14e 100644
+index ad0ccb82fe..3874148815 100644
@@ -50 +52 @@
-@@ -1715,14 +1715,13 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
+@@ -1796,14 +1796,13 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)


More information about the stable mailing list