patch 'net/bnxt: fix Rx next consumer index in mbuf alloc fail' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Sun Nov 28 15:53:55 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/30/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/7801afdd35968c08488fd7d21ae1dedae106c971

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 7801afdd35968c08488fd7d21ae1dedae106c971 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur at broadcom.com>
Date: Wed, 17 Nov 2021 08:42:06 +0530
Subject: [PATCH] net/bnxt: fix Rx next consumer index in mbuf alloc fail
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit a7e21843f0f6067ebe36eafff9b8319092db3fc4 ]

The driver internal variable to track the next consumer index on
the Rx ring was not being set if there was an mbuf allocation
failure. In that scenario, eventually it would fall out of sync
with the actual consumer index and raise a false alarm on Thor
needlessly causing a segmentation fault with testpmd

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

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

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index e847af9fff..43cb8057da 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -916,6 +916,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 		goto rx;
 	}
 	rxr->rx_prod = prod;
+rx:
 	rxr->rx_next_cons = RING_NEXT(rxr->rx_ring_struct, cons);
 
 	if (BNXT_TRUFLOW_EN(bp) && (BNXT_VF_IS_TRUSTED(bp) || BNXT_PF(bp)) &&
@@ -934,7 +935,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 	 * All MBUFs are allocated with the same size under DPDK,
 	 * no optimization for rx_copy_thresh
 	 */
-rx:
 	*rx_pkt = mbuf;
 
 next_rx:
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.952337654 +0800
+++ 0051-net-bnxt-fix-Rx-next-consumer-index-in-mbuf-alloc-fa.patch	2021-11-28 22:41:03.373540015 +0800
@@ -1 +1 @@
-From a7e21843f0f6067ebe36eafff9b8319092db3fc4 Mon Sep 17 00:00:00 2001
+From 7801afdd35968c08488fd7d21ae1dedae106c971 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit a7e21843f0f6067ebe36eafff9b8319092db3fc4 ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index 157297bc64..e2f09ad3a0 100644
+index e847af9fff..43cb8057da 100644
@@ -26 +28 @@
-@@ -986,6 +986,7 @@ reuse_rx_mbuf:
+@@ -916,6 +916,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
@@ -29 +31 @@
- 	rxr->rx_raw_prod = raw_prod;
+ 	rxr->rx_prod = prod;
@@ -31 +33 @@
- 	rxr->rx_next_cons = RING_IDX(rxr->rx_ring_struct, RING_NEXT(cons));
+ 	rxr->rx_next_cons = RING_NEXT(rxr->rx_ring_struct, cons);
@@ -34 +36 @@
-@@ -1004,7 +1005,6 @@ reuse_rx_mbuf:
+@@ -934,7 +935,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,


More information about the stable mailing list