patch 'net/bnxt/tf_core: fix TPM pool create error return' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:03:09 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/1fb6b446520db0b6c16069e3405aa661d2c42a6d
Thanks.
Kevin
---
>From 1fb6b446520db0b6c16069e3405aa661d2c42a6d Mon Sep 17 00:00:00 2001
From: Manish Kurup <manish.kurup at broadcom.com>
Date: Tue, 20 Oct 2026 01:59:57 -0500
Subject: [PATCH] net/bnxt/tf_core: fix TPM pool create error return
[ upstream commit 9b0517158277c0d0b0e3b1a4ca67b08b36397065 ]
tbl_scope_pools_create() can return success after a failure. When
rte_zmalloc() fails for a pool manager, rc is still 0 from the
previous step, so the function jumps to cleanup and returns 0. For
the other failures, the cleanup loop assigns the results of
cfa_tim_tpm_inst_get() and cfa_tim_tpm_inst_set() to rc, replacing
the error that caused the cleanup.
Callers then carry on with a table scope that has no pool managers.
Return -ENOMEM when the allocation fails, and keep the original
error across the cleanup.
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_tbl_scope.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c b/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c
index 0a5dce43fa..a761d9bdeb 100644
--- a/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c
+++ b/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c
@@ -575,4 +575,5 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
{
int rc;
+ int err;
int dir;
enum cfa_region_type region;
@@ -615,6 +616,8 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
for (dir = 0; dir < CFA_DIR_MAX; dir++) {
tpms[dir][region] = rte_zmalloc("TPM", tpm_db_size, 0);
- if (tpms[dir][region] == NULL)
+ if (tpms[dir][region] == NULL) {
+ rc = -ENOMEM;
goto cleanup;
+ }
rc = cfa_tpm_open(tpms[dir][region], tpm_db_size, parms->max_pools);
@@ -638,4 +641,6 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
cleanup:
+ /* Keep the error that got us here; the calls below overwrite rc */
+ err = rc;
if (tim) {
for (region = 0; region < CFA_REGION_TYPE_MAX; region++) {
@@ -667,5 +672,5 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
}
- return rc;
+ return err;
}
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:46.682174666 +0000
+++ 0263-net-bnxt-tf_core-fix-TPM-pool-create-error-return.patch 2026-12-03 12:52:39.212240874 +0000
@@ -1 +1 @@
-From 9b0517158277c0d0b0e3b1a4ca67b08b36397065 Mon Sep 17 00:00:00 2001
+From 1fb6b446520db0b6c16069e3405aa661d2c42a6d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9b0517158277c0d0b0e3b1a4ca67b08b36397065 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list