patch 'net/bnxt: fix ring teardown' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Mon Feb 21 16:34:10 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.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/26/22. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6c57090c01f03337b1eb75ae8a9524396f04aff2

Thanks.

Kevin

---
>From 6c57090c01f03337b1eb75ae8a9524396f04aff2 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde at broadcom.com>
Date: Tue, 4 Jan 2022 14:08:20 +0530
Subject: [PATCH] net/bnxt: fix ring teardown

[ upstream commit 54c6aad567839d4c9f0faa52093a2ef7641f77c3 ]

Check for valid bit while scanning for hwrm_done completion
during ring teardown. Not checking the valid bit could cause a
ring overflow when we ring the doorbell.

Fixes: 4fb6ab3f866d ("net/bnxt: check flush status during ring free")

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

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 9621809bd9..b60c2470f3 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -1412,4 +1412,7 @@ int bnxt_flush_rx_cmp(struct bnxt_cp_ring_info *cpr)
 		rxcmp = (struct rx_pkt_cmpl *)&cpr->cp_desc_ring[cons];
 
+		if (!bnxt_cpr_cmp_valid(rxcmp, raw_cons, ring_mask + 1))
+			break;
+
 		if (CMP_TYPE(rxcmp) == CMPL_BASE_TYPE_HWRM_DONE)
 			return 1;
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index e2b7e40571..3b8f2382f9 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -603,4 +603,7 @@ int bnxt_flush_tx_cmp(struct bnxt_cp_ring_info *cpr)
 		txcmp = (struct tx_cmpl *)&cp_desc_ring[cons];
 
+		if (!bnxt_cpr_cmp_valid(txcmp, raw_cons, ring_mask + 1))
+			break;
+
 		opaque = rte_cpu_to_le_32(txcmp->opaque);
 		raw_cons = NEXT_RAW_CMP(raw_cons);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-21 15:22:45.988318372 +0000
+++ 0061-net-bnxt-fix-ring-teardown.patch	2022-02-21 15:22:44.140704236 +0000
@@ -1 +1 @@
-From 54c6aad567839d4c9f0faa52093a2ef7641f77c3 Mon Sep 17 00:00:00 2001
+From 6c57090c01f03337b1eb75ae8a9524396f04aff2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 54c6aad567839d4c9f0faa52093a2ef7641f77c3 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list