DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dengdui Huang <huangdengdui@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@amd.com>, <stephen@networkplumber.org>,
	<haijie1@huawei.com>, <lihuisong@huawei.com>,
	<liuyonglong@huawei.com>, <fengchengwen@huawei.com>
Subject: [PATCH 1/3] net/hns3: fix reset detect be ignored
Date: Mon, 27 Nov 2023 21:39:01 +0800	[thread overview]
Message-ID: <20231127133903.1138657-2-huangdengdui@huawei.com> (raw)
In-Reply-To: <20231127133903.1138657-1-huangdengdui@huawei.com>

The code logic that only new reset whose level is higher than old
reset level will be addressed is added in hns3_detect_reset_event,
see commit 5be38fc6c0fc ("net/hns3: fix multiple reset detected log").
When the new reset is detected and the old reset level is HNS3_NONE_RESET
this reset will be ignored. This patch fix it.

Fixes: 5be38fc6c0fc ("net/hns3: fix multiple reset detected log")
Cc: stable@dpdk.org

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 941d047bf1..ae81368f68 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5560,7 +5560,10 @@ hns3_detect_reset_event(struct hns3_hw *hw)
 		new_req = HNS3_GLOBAL_RESET;
 	}
 
-	if (new_req != HNS3_NONE_RESET && last_req < new_req) {
+	if (new_req == HNS3_NONE_RESET)
+		return HNS3_NONE_RESET;
+
+	if (last_req == HNS3_NONE_RESET || last_req < new_req) {
 		hns3_schedule_delayed_reset(hns);
 		hns3_warn(hw, "High level reset detected, delay do reset");
 	}
-- 
2.33.0


  reply	other threads:[~2023-11-27 13:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27 13:39 [PATCH 0/3] fix some bug for hns3 Dengdui Huang
2023-11-27 13:39 ` Dengdui Huang [this message]
2023-11-27 13:39 ` [PATCH 2/3] net/hns3: fix VF wrong clear reset status Dengdui Huang
2023-11-27 13:39 ` [PATCH 3/3] net/hns3: fix the VF reset interrupted possibly Dengdui Huang
2023-11-27 13:55 ` [PATCH 0/3] fix some bug for hns3 Jie Hai
2023-11-27 18:33   ` Ferruh Yigit
2023-11-28  3:33     ` Jie Hai
2023-11-28 10:31       ` Thomas Monjalon

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=20231127133903.1138657-2-huangdengdui@huawei.com \
    --to=huangdengdui@huawei.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=ferruh.yigit@amd.com \
    --cc=haijie1@huawei.com \
    --cc=lihuisong@huawei.com \
    --cc=liuyonglong@huawei.com \
    --cc=stephen@networkplumber.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).