patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 20.11] net/hns3: fix concurrent interrupt handling
@ 2021-06-13  7:12 Min Hu (Connor)
  2021-06-13  7:42 ` Xueming(Steven) Li
  0 siblings, 1 reply; 2+ messages in thread
From: Min Hu (Connor) @ 2021-06-13  7:12 UTC (permalink / raw)
  To: stable; +Cc: xuemingl

From: Hongbo Zheng <zhenghongbo3@huawei.com>

[ upstream commit f9f24ecd794f88231110c823cdeff5d7ec9a4382 ]

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index 99b5301..0bba3ab 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -1787,7 +1787,8 @@ hns3_schedule_reset(struct hns3_adapter *hns)
 		return;
 	if (rte_atomic16_read(&hns->hw.reset.schedule) == SCHEDULE_DEFERRED)
 		rte_eal_alarm_cancel(hw->reset.ops->reset_service, hns);
-	rte_atomic16_set(&hns->hw.reset.schedule, SCHEDULE_REQUESTED);
+	else
+		rte_atomic16_set(&hns->hw.reset.schedule, SCHEDULE_REQUESTED);
 
 	rte_eal_alarm_set(SWITCH_CONTEXT_US, hw->reset.ops->reset_service, hns);
 }
-- 
2.7.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH 20.11] net/hns3: fix concurrent interrupt handling
  2021-06-13  7:12 [dpdk-stable] [PATCH 20.11] net/hns3: fix concurrent interrupt handling Min Hu (Connor)
@ 2021-06-13  7:42 ` Xueming(Steven) Li
  0 siblings, 0 replies; 2+ messages in thread
From: Xueming(Steven) Li @ 2021-06-13  7:42 UTC (permalink / raw)
  To: Min Hu (Connor), stable

Applied, thanks!

> -----Original Message-----
> From: Min Hu (Connor) <humin29@huawei.com>
> Sent: Sunday, June 13, 2021 3:13 PM
> To: stable@dpdk.org
> Cc: Xueming(Steven) Li <xuemingl@nvidia.com>
> Subject: [PATCH 20.11] net/hns3: fix concurrent interrupt handling
> 
> From: Hongbo Zheng <zhenghongbo3@huawei.com>
> 
> [ upstream commit f9f24ecd794f88231110c823cdeff5d7ec9a4382 ]
> 
> 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 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c index 99b5301..0bba3ab 100644
> --- a/drivers/net/hns3/hns3_intr.c
> +++ b/drivers/net/hns3/hns3_intr.c
> @@ -1787,7 +1787,8 @@ hns3_schedule_reset(struct hns3_adapter *hns)
>  		return;
>  	if (rte_atomic16_read(&hns->hw.reset.schedule) == SCHEDULE_DEFERRED)
>  		rte_eal_alarm_cancel(hw->reset.ops->reset_service, hns);
> -	rte_atomic16_set(&hns->hw.reset.schedule, SCHEDULE_REQUESTED);
> +	else
> +		rte_atomic16_set(&hns->hw.reset.schedule, SCHEDULE_REQUESTED);
> 
>  	rte_eal_alarm_set(SWITCH_CONTEXT_US, hw->reset.ops->reset_service, hns);  }
> --
> 2.7.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-13  7:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-13  7:12 [dpdk-stable] [PATCH 20.11] net/hns3: fix concurrent interrupt handling Min Hu (Connor)
2021-06-13  7:42 ` Xueming(Steven) Li

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).