[PATCH] net/bnxt: add debug log for ulp_regfile_write failure

Evgeny Sokolov Evgeny.Sokolov at infotecs.ru
Tue Sep 15 10:42:30 CEST 2026


From: Sokolov Evgeny <Evgeny.Sokolov at infotecs.ru>

The return value of ulp_regfile_write() is not checked in this path,
but failures may indicate issues when updating the EM insertion
status in the regfile.

Add a debug log to help diagnose potential failures during flow
processing.

Fixes: dd0191d5e70 ("net/bnxt/tf_ulp: support Thor2 ULP layer")
Cc: stable at dpdk.org

Signed-off-by: Sokolov Evgeny <Evgeny.Sokolov at infotecs.ru>
---
 drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c b/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
index 2d89f10d5e..66cd538c83 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
@@ -603,9 +603,11 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 				BNXT_DRV_DBG(DEBUG,
 					     "Fail to insert EM, shall add to wc\n");
 			}
-			ulp_regfile_write(parms->regfile, tbl->tbl_operand,
-					  rte_cpu_to_be_64(val));
-		}
+			if (unlikely(ulp_regfile_write(parms->regfile, tbl->tbl_operand,
+						       rte_cpu_to_be_64(val)))) {
+				BNXT_DRV_DBG(DEBUG, "Regfile[%d] write failed.\n",
+					     tbl->tbl_operand);
+			}
 
 		if (rc && rc != -E2BIG)
 			BNXT_DRV_DBG(ERR,
-- 
2.30.2



More information about the stable mailing list