DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>
Subject: [dpdk-dev] [PATCH v2 3/7] net/hns3: fix FLR failure when RAS concurrent with FLR
Date: Sat, 10 Apr 2021 09:11:16 +0800
Message-ID: <1618017080-50053-4-git-send-email-humin29@huawei.com> (raw)
In-Reply-To: <1618017080-50053-1-git-send-email-humin29@huawei.com>

From: Hongbo Zheng <zhenghongbo3@huawei.com>

Currently, if RAS interrupt and FLR occurred at the same time, FLR will
be detected and corresponding schedule state will be set during RAS
interrupt processing. However, the schedule state value will be
overridden in subsequent RAS processing, resulting in FLR processing
failure. This patch solves this problem.

Fixes: 2790c6464725 ("net/hns3: support device reset")
Cc: stable@dpdk.org

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_intr.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index 39a16a0..f3217c6 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -2133,10 +2133,11 @@ hns3_schedule_reset(struct hns3_adapter *hns)
 			SCHEDULE_REQUESTED)
 		return;
 	if (__atomic_load_n(&hw->reset.schedule, __ATOMIC_RELAXED) ==
-			SCHEDULE_DEFERRED)
+			    SCHEDULE_DEFERRED)
 		rte_eal_alarm_cancel(hw->reset.ops->reset_service, hns);
-	__atomic_store_n(&hw->reset.schedule, SCHEDULE_REQUESTED,
-			 __ATOMIC_RELAXED);
+	else
+		__atomic_store_n(&hw->reset.schedule, SCHEDULE_REQUESTED,
+				 __ATOMIC_RELAXED);
 
 	rte_eal_alarm_set(SWITCH_CONTEXT_US, hw->reset.ops->reset_service, hns);
 }
-- 
2.7.4


  parent reply	other threads:[~2021-04-10  1:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 10:15 [dpdk-dev] [PATCH 0/7] Bugfix for hns3 PMD Min Hu (Connor)
2021-04-09 10:15 ` [dpdk-dev] [PATCH 1/7] net/hns3: remove ariables of selecting Rx/Tx function Min Hu (Connor)
2021-04-09 10:16 ` [dpdk-dev] [PATCH 2/7] net/hns3: fix missing rollback in PF init Min Hu (Connor)
2021-04-09 10:16 ` [dpdk-dev] [PATCH 3/7] net/hns3: fix FLR failure when RAS concurrently with FLR Min Hu (Connor)
2021-04-09 10:16 ` [dpdk-dev] [PATCH 4/7] net/hns3: fix some packet type calc error Min Hu (Connor)
2021-04-09 10:16 ` [dpdk-dev] [PATCH 5/7] net/hns3: fix incorrect timing in resetting queues Min Hu (Connor)
2021-04-09 10:16 ` [dpdk-dev] [PATCH 6/7] net/hns3: fix queue state when concurrent with reset Min Hu (Connor)
2021-04-09 10:16 ` [dpdk-dev] [PATCH 7/7] net/hns3: fix configure FEC " Min Hu (Connor)
2021-04-10  1:11 ` [dpdk-dev] [PATCH v2 0/7] Bugfix for hns3 PMD Min Hu (Connor)
2021-04-10  1:11   ` [dpdk-dev] [PATCH v2 1/7] net/hns3: remove variables of selecting Rx/Tx function Min Hu (Connor)
2021-04-10  1:11   ` [dpdk-dev] [PATCH v2 2/7] net/hns3: fix missing rollback in PF init Min Hu (Connor)
2021-04-10  1:11   ` Min Hu (Connor) [this message]
2021-04-10  1:11   ` [dpdk-dev] [PATCH v2 4/7] net/hns3: fix some packet type calc error Min Hu (Connor)
2021-04-10  1:11   ` [dpdk-dev] [PATCH v2 5/7] net/hns3: fix incorrect timing in resetting queues Min Hu (Connor)
2021-04-10  1:11   ` [dpdk-dev] [PATCH v2 6/7] net/hns3: fix queue state when concurrent with reset Min Hu (Connor)
2021-04-10  1:11   ` [dpdk-dev] [PATCH v2 7/7] net/hns3: fix configure FEC " Min Hu (Connor)
2021-04-13  9:28   ` [dpdk-dev] [PATCH v2 0/7] Bugfix for hns3 PMD Ferruh Yigit

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=1618017080-50053-4-git-send-email-humin29@huawei.com \
    --to=humin29@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git