[dpdk-stable] patch 'net/bnxt: update ring group after ring stop start' has been queued to stable release 20.11.4
Xueming Li
xuemingl at nvidia.com
Wed Nov 10 07:28:14 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/83ec79465d8d8a72d22234732e616f16f98a7b64
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 83ec79465d8d8a72d22234732e616f16f98a7b64 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde at broadcom.com>
Date: Sun, 1 Aug 2021 21:44:30 -0700
Subject: [PATCH] net/bnxt: update ring group after ring stop start
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit ed0ae3502fc91adbf6eebe7047da887353844230 ]
A Rx ring stop start sequence may result in the FW returning
a different set of Rx ring and AGG ring IDs. If the ring group
is not updated with the new IDs, the HW sees the host driver using
incorrect BD types for the Rx ring and AGG ring. This can cause
the chip to go into a bad state or encounter RE_flush issue
or leak mbufs in the HW.
Fix this by issuing a bnxt_hwrm_ring_grp_free() and an
bnxt_hwrm_ring_grp_alloc() to refresh the ring group information.
Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")
Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 3 +++
drivers/net/bnxt/bnxt_ring.c | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 39778e38ef..d8b46f932a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2576,6 +2576,9 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
struct bnxt_ring *ring = rxr->rx_ring_struct;
struct bnxt_cp_ring_info *cpr = rxq->cp_ring;
+ if (BNXT_HAS_RING_GRPS(bp))
+ bnxt_hwrm_ring_grp_free(bp, queue_index);
+
bnxt_hwrm_ring_free(bp, ring,
HWRM_RING_FREE_INPUT_RING_TYPE_RX);
if (BNXT_HAS_RING_GRPS(bp))
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 6834244e4c..4cfa818616 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -608,6 +608,12 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
if (rc)
goto err_out;
+ if (BNXT_HAS_RING_GRPS(bp)) {
+ rc = bnxt_hwrm_ring_grp_alloc(bp, queue_index);
+ if (rc)
+ goto err_out;
+ }
+
if (rxq->rx_started) {
if (bnxt_init_one_rx_ring(rxq)) {
PMD_DRV_LOG(ERR,
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.583326783 +0800
+++ 0010-net-bnxt-update-ring-group-after-ring-stop-start.patch 2021-11-10 14:17:01.750747073 +0800
@@ -1 +1 @@
-From ed0ae3502fc91adbf6eebe7047da887353844230 Mon Sep 17 00:00:00 2001
+From 83ec79465d8d8a72d22234732e616f16f98a7b64 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit ed0ae3502fc91adbf6eebe7047da887353844230 ]
@@ -17 +19,0 @@
-Cc: stable at dpdk.org
@@ -27 +29 @@
-index 73deb41f81..eb9de45cb9 100644
+index 39778e38ef..d8b46f932a 100644
@@ -30 +32 @@
-@@ -2717,6 +2717,9 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
+@@ -2576,6 +2576,9 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
@@ -38,2 +40,2 @@
- HWRM_RING_FREE_INPUT_RING_TYPE_RX,
- cpr->cp_ring_struct->fw_ring_id);
+ HWRM_RING_FREE_INPUT_RING_TYPE_RX);
+ if (BNXT_HAS_RING_GRPS(bp))
@@ -41 +43 @@
-index b05c470766..957b175f1b 100644
+index 6834244e4c..4cfa818616 100644
@@ -44 +46 @@
-@@ -631,6 +631,12 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
+@@ -608,6 +608,12 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
@@ -56 +58 @@
- PMD_DRV_LOG(ERR, "bnxt_init_one_rx_ring failed!\n");
+ PMD_DRV_LOG(ERR,
More information about the stable
mailing list