[dpdk-stable] patch 'net/bnxt: fix double allocation of ring groups' has been queued to stable release 20.11.4
Xueming Li
xuemingl at nvidia.com
Wed Nov 10 07:28:34 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/fc300c1c4a2ec069fac7cc94f0960fe6c8174375
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From fc300c1c4a2ec069fac7cc94f0960fe6c8174375 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Wed, 1 Sep 2021 09:30:01 +0530
Subject: [PATCH] net/bnxt: fix double allocation of ring groups
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 36a97cd23fc916ac475a0b827074b5645fff0cfe ]
After commit "d68249f88266", driver allocates ring groups in
bnxt_alloc_hwrm_rx_ring(). But during port start, driver invokes
bnxt_alloc_hwrm_rx_ring() followed by bnxt_alloc_all_hwrm_ring_grps().
This will cause the FW command failure in bnxt_alloc_all_hwrm_ring_grps()
To fix this, just don't create the ring group if it is already created.
Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson at broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d8ff3c7920..50b41d82d3 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1737,6 +1737,10 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx)
struct hwrm_ring_grp_alloc_input req = {.req_type = 0 };
struct hwrm_ring_grp_alloc_output *resp = bp->hwrm_cmd_resp_addr;
+ /* Don't attempt to re-create the ring group if it is already created */
+ if (bp->grp_info[idx].fw_grp_id != INVALID_HW_RING_ID)
+ return 0;
+
HWRM_PREP(&req, HWRM_RING_GRP_ALLOC, BNXT_USE_CHIMP_MB);
req.cr = rte_cpu_to_le_16(bp->grp_info[idx].cp_fw_ring_id);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.464856411 +0800
+++ 0030-net-bnxt-fix-double-allocation-of-ring-groups.patch 2021-11-10 14:17:01.777413521 +0800
@@ -1 +1 @@
-From 36a97cd23fc916ac475a0b827074b5645fff0cfe Mon Sep 17 00:00:00 2001
+From fc300c1c4a2ec069fac7cc94f0960fe6c8174375 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 36a97cd23fc916ac475a0b827074b5645fff0cfe ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +26 @@
-index 0e0e266589..585cdeded8 100644
+index d8ff3c7920..50b41d82d3 100644
@@ -27 +29 @@
-@@ -1873,6 +1873,10 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx)
+@@ -1737,6 +1737,10 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx)
More information about the stable
mailing list