patch 'net/bnxt/tf_core: fix TCAM alloc-set key copy' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 5 17:41:52 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

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/07/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/420a17561e738d5e205ba04d2ca9c1e63c31f113

Thanks.

Luca Boccassi

---
>From 420a17561e738d5e205ba04d2ca9c1e63c31f113 Mon Sep 17 00:00:00 2001
From: Manish Kurup <manish.kurup at broadcom.com>
Date: Tue, 20 Oct 2026 01:59:44 -0500
Subject: [PATCH] net/bnxt/tf_core: fix TCAM alloc-set key copy

[ upstream commit 8f4d380b83ea275c3a1836a660f2d056ab1f8992 ]

In tfc_msg_tcam_alloc_set(), the key, mask and remap are copied into
the HWRM request with memcpy() using the address of the local
pointer variables (&key, &mask, &remap) as the source instead of the
data they point to. The copy lengths are also computed as
size * sizeof(uint32_t), although key_size and remap_size are
already byte counts, so each copy is four times too long and can run
past the 2 * key_size + remap_size bytes reserved in the request.

Copy from the key, mask and remap buffers themselves, and use the
byte sizes directly.

Fixes: 80317ff6adfd ("net/bnxt/tf_core: support Thor2")

Signed-off-by: Manish Kurup <manish.kurup at broadcom.com>
---
 drivers/net/bnxt/tf_core/v3/tfc_msg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/tf_core/v3/tfc_msg.c b/drivers/net/bnxt/tf_core/v3/tfc_msg.c
index 898ba94d85d..608af081429 100644
--- a/drivers/net/bnxt/tf_core/v3/tfc_msg.c
+++ b/drivers/net/bnxt/tf_core/v3/tfc_msg.c
@@ -959,9 +959,9 @@ tfc_msg_tcam_alloc_set(struct tfc *tfcp, uint16_t fid, uint16_t sid,
 		data = &req.dev_data[0];
 	}
 
-	memcpy(&data[0], &key, key_size * sizeof(uint32_t));
-	memcpy(&data[key_size], &mask, key_size * sizeof(uint32_t));
-	memcpy(&data[key_size * 2], &remap, remap_size * sizeof(uint32_t));
+	memcpy(&data[0], key, key_size);
+	memcpy(&data[key_size], mask, key_size);
+	memcpy(&data[key_size * 2], remap, remap_size);
 	rc = bnxt_hwrm_tf_message_direct(bp, false, HWRM_TFC_TCAM_ALLOC_SET,
 					 &req, sizeof(req), &resp, sizeof(resp));
 
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-05 16:42:45.992252453 +0000
+++ 0025-net-bnxt-tf_core-fix-TCAM-alloc-set-key-copy.patch	2026-11-05 16:42:44.921060786 +0000
@@ -1 +1 @@
-From 8f4d380b83ea275c3a1836a660f2d056ab1f8992 Mon Sep 17 00:00:00 2001
+From 420a17561e738d5e205ba04d2ca9c1e63c31f113 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f4d380b83ea275c3a1836a660f2d056ab1f8992 ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 89c256b810..af74007747 100644
+index 898ba94d85d..608af081429 100644
@@ -29 +30 @@
-@@ -1088,9 +1088,9 @@ tfc_msg_tcam_alloc_set(struct tfc *tfcp, uint16_t fid, uint16_t sid,
+@@ -959,9 +959,9 @@ tfc_msg_tcam_alloc_set(struct tfc *tfcp, uint16_t fid, uint16_t sid,


More information about the stable mailing list