patch 'net/bnxt: validate TPA aggregation ID from completions' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:01:56 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/26. 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/e9ac56445ab147bbe1d4c6ca3cb4b64ae5ba0e3c
Thanks.
Kevin
---
>From e9ac56445ab147bbe1d4c6ca3cb4b64ae5ba0e3c Mon Sep 17 00:00:00 2001
From: Mohammad Shuab Siddique <mohammad-shuab.siddique at broadcom.com>
Date: Tue, 29 Sep 2026 12:03:25 -0600
Subject: [PATCH] net/bnxt: validate TPA aggregation ID from completions
[ upstream commit f00dd9a7ccb8abf157b10ee3e19460b9cf655151 ]
TPA start/end and TPA v2 abuf paths indexed rxr->tpa_info[] using
the aggregation ID from the completion without checking
BNXT_TPA_MAX_AGGS. Add bounds checks and schedule a ring reset on
failure. Also fix abuf aggregation ID decode to use
rte_le_to_cpu_16() when reading the device field. On the legacy
(non-Thor) TPA end path, also discard the pending agg bufs before
returning on an invalid agg_id, matching the existing in_reset early
return a few lines above; otherwise those agg buf completions are
left unconsumed and the CQ raw_cons goes out of sync with the ring
even after the scheduled reset.
Fixes: 0958d8b6435d ("net/bnxt: support LRO")
Fixes: b150a7e7ee66 ("net/bnxt: support LRO on Thor adapters")
Signed-off-by: Mohammad Shuab Siddique <mohammad-shuab.siddique at broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 50 ++++++++++++++++++++++++++++---------
1 file changed, 38 insertions(+), 12 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 54d24d3586..d6c89c9e23 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -237,10 +237,17 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
{
struct bnxt_rx_ring_info *rxr = rxq->rx_ring;
- uint16_t agg_id;
- uint16_t data_cons;
struct bnxt_tpa_info *tpa_info;
+ uint32_t data_cons, agg_id;
+ struct bnxt *bp = rxq->bp;
struct rte_mbuf *mbuf;
- agg_id = bnxt_tpa_start_agg_id(rxq->bp, tpa_start);
+ agg_id = bnxt_tpa_start_agg_id(bp, tpa_start);
+ if (unlikely(agg_id >= BNXT_TPA_MAX_AGGS(bp))) {
+ PMD_DRV_LOG_LINE(ERR,
+ "TPA start: invalid agg_id %u (max %u)",
+ agg_id, BNXT_TPA_MAX_AGGS(bp));
+ bnxt_sched_ring_reset(rxq);
+ return;
+ }
data_cons = tpa_start->opaque;
@@ -269,5 +276,5 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
mbuf->ol_flags = RTE_MBUF_F_RX_LRO;
- bnxt_tpa_get_metadata(rxq->bp, tpa_info, tpa_start, tpa_start1);
+ bnxt_tpa_get_metadata(bp, tpa_info, tpa_start, tpa_start1);
if (likely(tpa_info->hash_valid)) {
@@ -279,5 +286,5 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
}
- if (tpa_info->vlan_valid && BNXT_RX_VLAN_STRIP_EN(rxq->bp)) {
+ if (tpa_info->vlan_valid && BNXT_RX_VLAN_STRIP_EN(bp)) {
mbuf->vlan_tci = tpa_info->vlan;
mbuf->ol_flags |= RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED;
@@ -422,18 +429,19 @@ static inline struct rte_mbuf *bnxt_tpa_end(
struct bnxt_cp_ring_info *cpr = rxq->cp_ring;
struct bnxt_rx_ring_info *rxr = rxq->rx_ring;
- uint16_t agg_id;
- struct rte_mbuf *mbuf;
- uint8_t agg_bufs;
+ struct bnxt_tpa_info *tpa_info;
+ struct bnxt *bp = rxq->bp;
uint8_t payload_offset;
- struct bnxt_tpa_info *tpa_info;
+ struct rte_mbuf *mbuf;
+ uint8_t agg_bufs;
+ uint32_t agg_id;
if (unlikely(rxq->in_reset)) {
PMD_DRV_LOG_LINE(ERR, "rxq->in_reset: raw_cp_cons:%d",
*raw_cp_cons);
- bnxt_discard_rx(rxq->bp, cpr, raw_cp_cons, tpa_end);
+ bnxt_discard_rx(bp, cpr, raw_cp_cons, tpa_end);
return NULL;
}
- if (BNXT_CHIP_P5_P7(rxq->bp)) {
+ if (BNXT_CHIP_P5_P7(bp)) {
struct rx_tpa_v2_end_cmpl *th_tpa_end;
struct rx_tpa_v2_end_cmpl_hi *th_tpa_end1;
@@ -452,4 +460,13 @@ static inline struct rte_mbuf *bnxt_tpa_end(
}
+ if (unlikely(agg_id >= BNXT_TPA_MAX_AGGS(bp))) {
+ PMD_DRV_LOG_LINE(ERR,
+ "TPA end: invalid agg_id %u (max %u)",
+ agg_id, BNXT_TPA_MAX_AGGS(bp));
+ bnxt_discard_rx(bp, cpr, raw_cp_cons, tpa_end);
+ bnxt_sched_ring_reset(rxq);
+ return NULL;
+ }
+
tpa_info = &rxr->tpa_info[agg_id];
mbuf = tpa_info->mbuf;
@@ -1137,7 +1154,16 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
if (cmp_type == RX_TPA_V2_ABUF_CMPL_TYPE_RX_TPA_AGG) {
struct rx_tpa_v2_abuf_cmpl *rx_agg = (void *)rxcmp;
- uint16_t agg_id = rte_cpu_to_le_16(rx_agg->agg_id);
+ uint32_t agg_id = rte_le_to_cpu_16(rx_agg->agg_id);
struct bnxt_tpa_info *tpa_info;
+ if (unlikely(agg_id >= BNXT_TPA_MAX_AGGS(bp))) {
+ PMD_DRV_LOG_LINE(ERR,
+ "TPA abuf: invalid agg_id %u (max %u)",
+ agg_id, BNXT_TPA_MAX_AGGS(bp));
+ bnxt_sched_ring_reset(rxq);
+ rc = -EINVAL;
+ goto next_rx;
+ }
+
tpa_info = &rxr->tpa_info[agg_id];
RTE_ASSERT(tpa_info->agg_count < 16);
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:44.656482181 +0000
+++ 0190-net-bnxt-validate-TPA-aggregation-ID-from-completion.patch 2026-12-03 12:52:39.164539692 +0000
@@ -1 +1 @@
-From f00dd9a7ccb8abf157b10ee3e19460b9cf655151 Mon Sep 17 00:00:00 2001
+From e9ac56445ab147bbe1d4c6ca3cb4b64ae5ba0e3c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f00dd9a7ccb8abf157b10ee3e19460b9cf655151 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index 98bdbc136a..1790ce839f 100644
+index 54d24d3586..d6c89c9e23 100644
@@ -30 +31 @@
-@@ -228,10 +228,17 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
+@@ -237,10 +237,17 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
@@ -51 +52 @@
-@@ -260,5 +267,5 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
+@@ -269,5 +276,5 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
@@ -58 +59 @@
-@@ -270,5 +277,5 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
+@@ -279,5 +286,5 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
@@ -65 +66 @@
-@@ -413,18 +420,19 @@ static inline struct rte_mbuf *bnxt_tpa_end(
+@@ -422,18 +429,19 @@ static inline struct rte_mbuf *bnxt_tpa_end(
@@ -91 +92 @@
-@@ -443,4 +451,13 @@ static inline struct rte_mbuf *bnxt_tpa_end(
+@@ -452,4 +460,13 @@ static inline struct rte_mbuf *bnxt_tpa_end(
@@ -105 +106 @@
-@@ -1127,7 +1144,16 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
+@@ -1137,7 +1154,16 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
More information about the stable
mailing list