From: Sokolov Evgeny <[email protected]>
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: [email protected]
Signed-off-by: Sokolov Evgeny <[email protected]>
---
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