[dpdk-stable] patch 'net/bnxt: fix crash after port stop/start' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:28:16 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8f75f8b588670e687c5602f369a21244316fd344

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 8f75f8b588670e687c5602f369a21244316fd344 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur at broadcom.com>
Date: Mon, 23 Aug 2021 21:14:53 +0530
Subject: [PATCH] net/bnxt: fix crash after port stop/start
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 61cd4384fabf67d487a3ae85cff5babcdb41558f ]

On chips like Thor, port stop/start sequence could result in a crash
in the application. This is because of false detection of a bad
opaque in the Rx completion and the subsequent kicking-in of the ring
reset code to recover from the condition.
The root cause being that the port stop/start would result in the HW
starting with fresh values, while the driver internal tracker variable
`rx_next_cons` is still pointing to a stale value.
Fix this by resetting rx_next_cons to 0 in bnxt_init_one_rx_ring()

Fixes: 03c8f2fe111c ("net/bnxt: detect bad opaque in Rx completion")

Signed-off-by: Somnath Kotur <somnath.kotur at broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 41be74284b..655f09a9bf 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -1308,5 +1308,8 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 	}
 	PMD_DRV_LOG(DEBUG, "TPA alloc Done!\n");
 
+	/* Explicitly reset this driver internal tracker on a ring init */
+	rxr->rx_next_cons = 0;
+
 	return 0;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.672364996 +0800
+++ 0012-net-bnxt-fix-crash-after-port-stop-start.patch	2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From 61cd4384fabf67d487a3ae85cff5babcdb41558f Mon Sep 17 00:00:00 2001
+From 8f75f8b588670e687c5602f369a21244316fd344 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 61cd4384fabf67d487a3ae85cff5babcdb41558f ]
@@ -16 +18,0 @@
-Cc: stable at dpdk.org
@@ -26 +28 @@
-index aea71703d1..73fbdd17d1 100644
+index 41be74284b..655f09a9bf 100644
@@ -29 +31 @@
-@@ -1379,6 +1379,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
+@@ -1308,5 +1308,8 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
@@ -38 +39,0 @@
- 


More information about the stable mailing list