patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Dengdui Huang <huangdengdui@huawei.com>
Cc: Jie Hai <haijie1@huawei.com>, dpdk stable <stable@dpdk.org>
Subject: patch 'net/hns3: fix reset level comparison' has been queued to stable release 21.11.7
Date: Tue,  5 Mar 2024 15:34:18 +0000	[thread overview]
Message-ID: <20240305153449.263666-45-ktraynor@redhat.com> (raw)
In-Reply-To: <20240305153449.263666-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to stable release 21.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 03/11/24. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/51fd05c6ade223a85b25dd9779c9bf883ae146e9

Thanks.

Kevin

---
From 51fd05c6ade223a85b25dd9779c9bf883ae146e9 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 15:44:16 +0800
Subject: [PATCH] net/hns3: fix reset level comparison

[ upstream commit 1ceb5ad2dfdcc3e6658119d25253bced5be3cc32 ]

Currently, there are two problems in hns3vf_is_reset_pending():
1. The new detect reset level is not HNS3_NONE_RESET, but the
   last reset level is HNS3_NONE_RESET, this function returns false.
2. Comparison between last_req and new_req is opposite.

In addition, the reset level comparison in hns3_detect_reset_event()
is similar to the hns3vf_is_reset_pending(). So this patch fixes
above the problems and merges the logic of reset level comparison.

Fixes: 5be38fc6c0fc ("net/hns3: fix multiple reset detected log")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 619346b5ac..4f60b83b3a 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5598,10 +5598,7 @@ static enum hns3_reset_level
 hns3_detect_reset_event(struct hns3_hw *hw)
 {
-	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	enum hns3_reset_level new_req = HNS3_NONE_RESET;
-	enum hns3_reset_level last_req;
 	uint32_t vector0_intr_state;
 
-	last_req = hns3_get_reset_level(hns, &hw->reset.pending);
 	vector0_intr_state = hns3_read_dev(hw, HNS3_VECTOR0_OTHER_INT_STS_REG);
 	if (BIT(HNS3_VECTOR0_IMPRESET_INT_B) & vector0_intr_state)
@@ -5610,13 +5607,4 @@ hns3_detect_reset_event(struct hns3_hw *hw)
 		new_req = HNS3_GLOBAL_RESET;
 
-	if (new_req == HNS3_NONE_RESET)
-		return HNS3_NONE_RESET;
-
-	if (last_req == HNS3_NONE_RESET || last_req < new_req) {
-		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
-		hns3_schedule_delayed_reset(hns);
-		hns3_warn(hw, "High level reset detected, delay do reset");
-	}
-
 	return new_req;
 }
@@ -5637,8 +5625,12 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
 
 	new_req = hns3_detect_reset_event(hw);
+	if (new_req == HNS3_NONE_RESET)
+		return false;
+
 	last_req = hns3_get_reset_level(hns, &hw->reset.pending);
-	if (last_req != HNS3_NONE_RESET && new_req != HNS3_NONE_RESET &&
-	    new_req < last_req) {
-		hns3_warn(hw, "High level reset %d is pending", last_req);
+	if (last_req == HNS3_NONE_RESET || last_req < new_req) {
+		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+		hns3_schedule_delayed_reset(hns);
+		hns3_warn(hw, "High level reset detected, delay do reset");
 		return true;
 	}
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.727067894 +0000
+++ 0045-net-hns3-fix-reset-level-comparison.patch	2024-03-05 14:08:54.671520821 +0000
@@ -1 +1 @@
-From 1ceb5ad2dfdcc3e6658119d25253bced5be3cc32 Mon Sep 17 00:00:00 2001
+From 51fd05c6ade223a85b25dd9779c9bf883ae146e9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1ceb5ad2dfdcc3e6658119d25253bced5be3cc32 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index d626bdd5b1..eafcf2c6f6 100644
+index 619346b5ac..4f60b83b3a 100644
@@ -28 +29 @@
-@@ -5546,10 +5546,7 @@ static enum hns3_reset_level
+@@ -5598,10 +5598,7 @@ static enum hns3_reset_level
@@ -39 +40 @@
-@@ -5558,13 +5555,4 @@ hns3_detect_reset_event(struct hns3_hw *hw)
+@@ -5610,13 +5607,4 @@ hns3_detect_reset_event(struct hns3_hw *hw)
@@ -53 +54 @@
-@@ -5585,8 +5573,12 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
+@@ -5637,8 +5625,12 @@ hns3_is_reset_pending(struct hns3_adapter *hns)


  parent reply	other threads:[~2024-03-05 15:36 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05 15:33 patch 'hash: remove some dead code' " Kevin Traynor
2024-03-05 15:33 ` patch 'regexdev: fix logtype register' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/i40e: remove redundant judgment in flow parsing' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/iavf: fix memory leak on security context error' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/ixgbe: fix memoy leak after device init failure' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/ice: fix link update' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/ice: fix tunnel TSO capabilities' " Kevin Traynor
2024-03-05 15:33 ` patch 'kernel/freebsd: fix module build on FreeBSD 14' " Kevin Traynor
2024-03-05 15:33 ` patch 'ci: update versions of actions in GHA' " Kevin Traynor
2024-03-05 15:33 ` patch 'eal/x86: add AMD vendor check for TSC calibration' " Kevin Traynor
2024-03-05 15:33 ` patch 'eal: verify strdup return' " Kevin Traynor
2024-03-05 15:33 ` patch 'bus/dpaa: " Kevin Traynor
2024-03-05 15:33 ` patch 'bus/fslmc: " Kevin Traynor
2024-03-05 15:33 ` patch 'bus/vdev: " Kevin Traynor
2024-03-05 15:33 ` patch 'dma/idxd: " Kevin Traynor
2024-03-05 15:33 ` patch 'event/cnxk: " Kevin Traynor
2024-03-05 15:33 ` patch 'net/failsafe: fix memory leak in args parsing' " Kevin Traynor
2024-03-05 15:33 ` patch 'app/dumpcap: verify strdup return' " Kevin Traynor
2024-03-05 15:33 ` patch 'app/pdump: " Kevin Traynor
2024-03-05 15:33 ` patch 'app/crypto-perf: " Kevin Traynor
2024-03-05 15:33 ` patch 'test: " Kevin Traynor
2024-03-05 15:33 ` patch 'examples/qos_sched: fix memory leak in args parsing' " Kevin Traynor
2024-03-05 15:33 ` patch 'common/mlx5: fix calloc parameters' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/bnx2x: " Kevin Traynor
2024-03-05 15:33 ` patch 'net/nfp: " Kevin Traynor
2024-03-05 15:33 ` patch 'build: fix linker warnings about undefined symbols' " Kevin Traynor
2024-03-05 15:34 ` patch 'vhost: fix virtqueue access check in vhost-user setup' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/virtio: remove duplicate queue xstats' " Kevin Traynor
2024-03-05 15:34 ` patch 'vhost: fix deadlock during vDPA SW live migration' " Kevin Traynor
2024-03-05 15:34 ` patch 'vhost: fix memory leak in Virtio Tx split path' " Kevin Traynor
2024-03-05 15:34 ` patch 'cryptodev: remove unused extern variable' " Kevin Traynor
2024-03-05 15:34 ` patch 'common/cnxk: fix memory leak in CPT init' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/crypto-perf: fix next segment mbuf' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/crypto-perf: fix data comparison' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/crypto-perf: fix encrypt operation verification' " Kevin Traynor
2024-03-05 15:34 ` patch 'event/cnxk: fix dequeue timeout configuration' " Kevin Traynor
2024-03-05 15:34 ` patch 'test/event: skip test if no driver is present' " Kevin Traynor
2024-03-05 15:34 ` patch 'doc: fix commands in eventdev test tool guide' " Kevin Traynor
2024-03-05 15:34 ` patch 'ethdev: fix NVGRE encap flow action description' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/af_xdp: fix memzone leak on config failure' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: refactor VF mailbox message struct' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: refactor PF " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: fix VF multiple count on one reset' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: fix disable command with firmware' " Kevin Traynor
2024-03-05 15:34 ` Kevin Traynor [this message]
2024-03-05 15:34 ` patch 'net/hns3: remove QinQ insert support for VF' " Kevin Traynor
2024-03-05 15:34 ` patch 'doc: add --latencystats option in testpmd guide' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/testpmd: hide --bitrate-stats in help if disabled' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/vmxnet3: fix initialization on FreeBSD' " Kevin Traynor
2024-03-05 15:34 ` patch 'drivers/net: fix buffer overflow for packet types list' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/testpmd: fix crash in multi-process forwarding' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/ionic: fix RSS query' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/ionic: fix device close' " Kevin Traynor
2024-03-05 15:34 ` patch 'common/sfc_efx/base: use C11 static assert' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' " Kevin Traynor
2024-03-05 15:34 ` patch 'net: add macros for VLAN metadata parsing' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/netvsc: fix " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix array overflow' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix 50G and 100G forced speed' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix speed change from 200G to 25G on Thor' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix backward firmware compatibility' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: modify locking for representor Tx' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix deadlock in ULP timer callback' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/cnxk: fix flow RSS configuration' " Kevin Traynor
2024-03-05 15:34 ` patch 'common/cnxk: fix mbox region copy' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/mlx5: fix jump action validation' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/mlx5: fix GENEVE TLV option management' " Kevin Traynor
2024-03-05 15:34 ` patch 'common/mlx5: fix duplicate read of general capabilities' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/mlx5: fix stats query crash in secondary process' " Kevin Traynor
2024-03-05 15:34 ` patch 'telemetry: fix connected clients count' " Kevin Traynor
2024-03-05 15:34 ` patch 'telemetry: fix empty JSON dictionaries' " Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240305153449.263666-45-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=haijie1@huawei.com \
    --cc=huangdengdui@huawei.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).