patch 'net/bnxt/tf_core: fix TPM pool create error return' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Nov 5 17:41:57 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/b0d01e0c859f8440109e48ccda37141951e391fd
Thanks.
Luca Boccassi
---
>From b0d01e0c859f8440109e48ccda37141951e391fd 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 c29933b803b..8c49c3c6100 100644
--- a/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c
+++ b/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c
@@ -571,6 +571,7 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
struct tbl_scope_pools_create_parms *parms)
{
int rc;
+ int err;
int dir;
enum cfa_region_type region;
uint32_t tpm_db_size;
@@ -611,8 +612,10 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
for (region = 0; region < CFA_REGION_TYPE_MAX; region++) {
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);
if (rc)
@@ -634,6 +637,8 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
return rc;
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++) {
for (dir = 0; dir < CFA_DIR_MAX; dir++) {
@@ -663,7 +668,7 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
}
}
- return rc;
+ return err;
}
/**
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-11-05 16:42:46.179322026 +0000
+++ 0030-net-bnxt-tf_core-fix-TPM-pool-create-error-return.patch 2026-11-05 16:42:44.925060906 +0000
@@ -1 +1 @@
-From 9b0517158277c0d0b0e3b1a4ca67b08b36397065 Mon Sep 17 00:00:00 2001
+From b0d01e0c859f8440109e48ccda37141951e391fd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9b0517158277c0d0b0e3b1a4ca67b08b36397065 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index 0a5dce43fa..a761d9bdeb 100644
+index c29933b803b..8c49c3c6100 100644
@@ -30 +31 @@
-@@ -574,6 +574,7 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
+@@ -571,6 +571,7 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
@@ -38 +39 @@
-@@ -614,8 +615,10 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
+@@ -611,8 +612,10 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
@@ -50 +51 @@
-@@ -637,6 +640,8 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
+@@ -634,6 +637,8 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
@@ -59 +60 @@
-@@ -666,7 +671,7 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
+@@ -663,7 +668,7 @@ static int tbl_scope_pools_create(struct tfc *tfcp, uint8_t tsid,
More information about the stable
mailing list