[dpdk-stable] patch 'net/bnxt: fix race condition when port is stopped' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Feb 27 10:33:46 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. 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.

Thanks.

Luca Boccassi

---
>From b28f36ddb0add0ee4501fbe1acf46bc70b9898fc Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Thu, 20 Feb 2020 09:42:14 +0530
Subject: [PATCH] net/bnxt: fix race condition when port is stopped

[ upstream commit c696cc659337c682f1055e646600ab3dca733b0e ]

Fix a race condition between port stop and error recovery task. When io
forwarding is not started on Stingray devices, driver will not receive
the async event from FW when there is a FW reset. While exiting testpmd,
as part of port stop driver sees this event and this in turn causes a
race between port stop and error recovery task.

Fixed this by ignoring the fatal/non-fatal async event from FW while
stopping port.

Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_cpr.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index bb316b9e05..c0e492e6c2 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -76,6 +76,12 @@ void bnxt_handle_async_event(struct bnxt *bp,
 		PMD_DRV_LOG(INFO, "Port conn async event\n");
 		break;
 	case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RESET_NOTIFY:
+		/* Ignore reset notify async events when stopping the port */
+		if (!bp->eth_dev->data->dev_started) {
+			bp->flags |= BNXT_FLAG_FATAL_ERROR;
+			return;
+		}
+
 		event_data = rte_le_to_cpu_32(async_cmp->event_data1);
 		/* timestamp_lo/hi values are in units of 100ms */
 		bp->fw_reset_max_msecs = async_cmp->timestamp_hi ?
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-27 09:31:56.658991623 +0000
+++ 0026-net-bnxt-fix-race-condition-when-port-is-stopped.patch	2020-02-27 09:31:55.755946020 +0000
@@ -1,8 +1,10 @@
-From c696cc659337c682f1055e646600ab3dca733b0e Mon Sep 17 00:00:00 2001
+From b28f36ddb0add0ee4501fbe1acf46bc70b9898fc Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
 Date: Thu, 20 Feb 2020 09:42:14 +0530
 Subject: [PATCH] net/bnxt: fix race condition when port is stopped
 
+[ upstream commit c696cc659337c682f1055e646600ab3dca733b0e ]
+
 Fix a race condition between port stop and error recovery task. When io
 forwarding is not started on Stingray devices, driver will not receive
 the async event from FW when there is a FW reset. While exiting testpmd,
@@ -13,7 +15,6 @@
 stopping port.
 
 Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
-Cc: stable at dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
 Reviewed-by: Rahul Gupta <rahul.gupta at broadcom.com>
@@ -23,7 +24,7 @@
  1 file changed, 6 insertions(+)
 
 diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
-index 0f7b5e96ca..21565b1e24 100644
+index bb316b9e05..c0e492e6c2 100644
 --- a/drivers/net/bnxt/bnxt_cpr.c
 +++ b/drivers/net/bnxt/bnxt_cpr.c
 @@ -76,6 +76,12 @@ void bnxt_handle_async_event(struct bnxt *bp,


More information about the stable mailing list