diff mbox series

[3/7] net/hns3: fix FLR failure when RAS concurrently with FLR

Message ID 1617963365-41299-4-git-send-email-humin29@huawei.com (mailing list archive)
State Superseded
Delegated to: Ferruh Yigit
Headers show
Series Bugfix for hns3 PMD | expand


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Min Hu (Connor) April 9, 2021, 10:16 a.m. UTC
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 mbox series


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)
 	if (__atomic_load_n(&hw->reset.schedule, __ATOMIC_RELAXED) ==
 		rte_eal_alarm_cancel(hw->reset.ops->reset_service, hns);
-	__atomic_store_n(&hw->reset.schedule, SCHEDULE_REQUESTED,
+	else
+		__atomic_store_n(&hw->reset.schedule, SCHEDULE_REQUESTED,
 	rte_eal_alarm_set(SWITCH_CONTEXT_US, hw->reset.ops->reset_service, hns);