* [PATCH] Adding the return values checking
@ 2026-09-15 10:40 Evgeny Sokolov
2026-09-15 13:37 ` Stephen Hemminger
2026-09-21 14:42 ` Kishore Padmanabha
0 siblings, 2 replies; 3+ messages in thread
From: Evgeny Sokolov @ 2026-09-15 10:40 UTC (permalink / raw)
To: Kishore Padmanabha, Ajit Khaparde; +Cc: dev, stable, Evgeny Sokolov
---
drivers/net/bnxt/bnxt_ethdev.c | 29 +++++++++++++++++--------
drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 2 ++
drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c | 2 +-
3 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 8e8ead8f61..c99c375412 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6395,57 +6395,68 @@ bnxt_parse_dev_args(struct bnxt *bp, struct rte_devargs *devargs)
if (ret)
goto err;
-err:
/*
* Handler for "mpc" devarg.
* Invoked as for ex: "-a 000:00:0d.0,mpc=1"
*/
- rte_kvargs_process(kvlist, BNXT_DEVARG_MPC,
+ ret = rte_kvargs_process(kvlist, BNXT_DEVARG_MPC,
bnxt_parse_devarg_mpc, bp);
+ if (ret)
+ goto err;
/*
* Handler for "app-id" devarg.
* Invoked as for ex: "-a 000:00:0d.0,app-id=1"
*/
- rte_kvargs_process(kvlist, BNXT_DEVARG_APP_ID,
+ ret = rte_kvargs_process(kvlist, BNXT_DEVARG_APP_ID,
bnxt_parse_devarg_app_id, bp);
+ if (ret)
+ goto err;
/*
* Handler for "ieee-1588" devarg.
* Invoked as for ex: "-a 000:00:0d.0,ieee-1588=1"
*/
- rte_kvargs_process(kvlist, BNXT_DEVARG_IEEE_1588,
+ ret = rte_kvargs_process(kvlist, BNXT_DEVARG_IEEE_1588,
bnxt_parse_devarg_ieee_1588, bp);
+ if (ret)
+ goto err;
/*
* Handler for "cqe-mode" devarg.
* Invoked as for ex: "-a 000:00:0d.0,cqe-mode=1"
*/
- rte_kvargs_process(kvlist, BNXT_DEVARG_CQE_MODE,
+ ret = rte_kvargs_process(kvlist, BNXT_DEVARG_CQE_MODE,
bnxt_parse_devarg_cqe_mode, bp);
+ if (ret)
+ goto err;
/*
* Handler for "representor" devarg.
* Invoked as for ex: "-a 000:00:0d.0,representor=1"
*/
- rte_kvargs_process(kvlist, BNXT_DEVARG_REPRESENTOR,
+ ret = rte_kvargs_process(kvlist, BNXT_DEVARG_REPRESENTOR,
bnxt_parse_devarg_representor_mode, bp);
+ if (ret)
+ goto err;
/*
* Handler for "scalar-mode" devarg.
* Invoked as for ex: "-a 000:00:0d.0,scalar-mode=1"
*/
- rte_kvargs_process(kvlist, BNXT_DEVARG_SCALAR_MODE,
+ ret = rte_kvargs_process(kvlist, BNXT_DEVARG_SCALAR_MODE,
bnxt_parse_devarg_scalar_mode, bp);
+ if (ret)
+ goto err;
/*
* Handler for "app-instance-id" devarg.
* Invoked as for ex: "-a 000:00:0d.0,app-instance-id=1"
* This argument is required for enabling truflow hot upgrade feature.
*/
- rte_kvargs_process(kvlist, BNXT_DEVARD_APP_INST_ID,
+ ret = rte_kvargs_process(kvlist, BNXT_DEVARD_APP_INST_ID,
bnxt_parse_devarg_app_instance_id, bp);
-
+err:
rte_kvargs_free(kvlist);
return ret;
}
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index fa98b2bca9..facce8f125 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -309,6 +309,8 @@ ulp_tfc_tbl_scope_deinit(struct bnxt *bp)
return;
rc = bnxt_ulp_cntxt_tsid_get(bp->ulp_ctx, &tsid);
+ if (rc)
+ return;
rc = bnxt_ulp_cntxt_fid_get(bp->ulp_ctx, &fid);
if (rc)
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c b/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
index f17fb6e3b2..075071620f 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
@@ -404,7 +404,7 @@ ulp_mapper_tf_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,
+ rc = ulp_regfile_write(parms->regfile, tbl->tbl_operand,
tfp_cpu_to_be_64(val));
}
if (rc)
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Adding the return values checking
2026-09-15 10:40 [PATCH] Adding the return values checking Evgeny Sokolov
@ 2026-09-15 13:37 ` Stephen Hemminger
2026-09-21 14:42 ` Kishore Padmanabha
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2026-09-15 13:37 UTC (permalink / raw)
To: Evgeny Sokolov; +Cc: Kishore Padmanabha, Ajit Khaparde, dev, stable
On Tue, 15 Sep 2026 10:40:05 +0000
Evgeny Sokolov <Evgeny.Sokolov@infotecs.ru> wrote:
> ---
> drivers/net/bnxt/bnxt_ethdev.c | 29 +++++++++++++++++--------
> drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 2 ++
> drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c | 2 +-
> 3 files changed, 23 insertions(+), 10 deletions(-)
This is covered in the kvargs helper patch series.
Also please provide more in commit message and should these get backported to stable.
Should also have a Fixes: tag.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Adding the return values checking
2026-09-15 10:40 [PATCH] Adding the return values checking Evgeny Sokolov
2026-09-15 13:37 ` Stephen Hemminger
@ 2026-09-21 14:42 ` Kishore Padmanabha
1 sibling, 0 replies; 3+ messages in thread
From: Kishore Padmanabha @ 2026-09-21 14:42 UTC (permalink / raw)
To: Evgeny Sokolov; +Cc: Ajit Khaparde, dev, stable
[-- Attachment #1.1: Type: text/plain, Size: 4867 bytes --]
On Tue, Sep 15, 2026 at 6:40 AM Evgeny Sokolov <Evgeny.Sokolov@infotecs.ru>
wrote:
> ---
> drivers/net/bnxt/bnxt_ethdev.c | 29 +++++++++++++++++--------
> drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 2 ++
> drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c | 2 +-
> 3 files changed, 23 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> b/drivers/net/bnxt/bnxt_ethdev.c
> index 8e8ead8f61..c99c375412 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -6395,57 +6395,68 @@ bnxt_parse_dev_args(struct bnxt *bp, struct
> rte_devargs *devargs)
> if (ret)
> goto err;
>
> -err:
> /*
> * Handler for "mpc" devarg.
> * Invoked as for ex: "-a 000:00:0d.0,mpc=1"
> */
> - rte_kvargs_process(kvlist, BNXT_DEVARG_MPC,
> + ret = rte_kvargs_process(kvlist, BNXT_DEVARG_MPC,
> bnxt_parse_devarg_mpc, bp);
> + if (ret)
> + goto err;
>
> /*
> * Handler for "app-id" devarg.
> * Invoked as for ex: "-a 000:00:0d.0,app-id=1"
> */
> - rte_kvargs_process(kvlist, BNXT_DEVARG_APP_ID,
> + ret = rte_kvargs_process(kvlist, BNXT_DEVARG_APP_ID,
> bnxt_parse_devarg_app_id, bp);
> + if (ret)
> + goto err;
>
> /*
> * Handler for "ieee-1588" devarg.
> * Invoked as for ex: "-a 000:00:0d.0,ieee-1588=1"
> */
> - rte_kvargs_process(kvlist, BNXT_DEVARG_IEEE_1588,
> + ret = rte_kvargs_process(kvlist, BNXT_DEVARG_IEEE_1588,
> bnxt_parse_devarg_ieee_1588, bp);
> + if (ret)
> + goto err;
>
> /*
> * Handler for "cqe-mode" devarg.
> * Invoked as for ex: "-a 000:00:0d.0,cqe-mode=1"
> */
> - rte_kvargs_process(kvlist, BNXT_DEVARG_CQE_MODE,
> + ret = rte_kvargs_process(kvlist, BNXT_DEVARG_CQE_MODE,
> bnxt_parse_devarg_cqe_mode, bp);
> + if (ret)
> + goto err;
>
> /*
> * Handler for "representor" devarg.
> * Invoked as for ex: "-a 000:00:0d.0,representor=1"
> */
> - rte_kvargs_process(kvlist, BNXT_DEVARG_REPRESENTOR,
> + ret = rte_kvargs_process(kvlist, BNXT_DEVARG_REPRESENTOR,
> bnxt_parse_devarg_representor_mode, bp);
> + if (ret)
> + goto err;
>
> /*
> * Handler for "scalar-mode" devarg.
> * Invoked as for ex: "-a 000:00:0d.0,scalar-mode=1"
> */
> - rte_kvargs_process(kvlist, BNXT_DEVARG_SCALAR_MODE,
> + ret = rte_kvargs_process(kvlist, BNXT_DEVARG_SCALAR_MODE,
> bnxt_parse_devarg_scalar_mode, bp);
> + if (ret)
> + goto err;
>
> /*
> * Handler for "app-instance-id" devarg.
> * Invoked as for ex: "-a 000:00:0d.0,app-instance-id=1"
> * This argument is required for enabling truflow hot upgrade
> feature.
> */
> - rte_kvargs_process(kvlist, BNXT_DEVARD_APP_INST_ID,
> + ret = rte_kvargs_process(kvlist, BNXT_DEVARD_APP_INST_ID,
> bnxt_parse_devarg_app_instance_id, bp);
> -
> +err:
> rte_kvargs_free(kvlist);
> return ret;
> }
> diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
> b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
> index fa98b2bca9..facce8f125 100644
> --- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
> +++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
> @@ -309,6 +309,8 @@ ulp_tfc_tbl_scope_deinit(struct bnxt *bp)
> return;
>
> rc = bnxt_ulp_cntxt_tsid_get(bp->ulp_ctx, &tsid);
> + if (rc)
> + return;
>
> rc = bnxt_ulp_cntxt_fid_get(bp->ulp_ctx, &fid);
> if (rc)
> diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
> b/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
> index f17fb6e3b2..075071620f 100644
> --- a/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
> +++ b/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
> @@ -404,7 +404,7 @@ ulp_mapper_tf_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,
> + rc = ulp_regfile_write(parms->regfile,
> tbl->tbl_operand,
> tfp_cpu_to_be_64(val));
>
The return code needs to be handled, cannot overload this to rc.
> }
> if (rc)
> --
> 2.47.3
>
>
[-- Attachment #1.2: Type: text/html, Size: 6273 bytes --]
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5493 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-21 14:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15 10:40 [PATCH] Adding the return values checking Evgeny Sokolov
2026-09-15 13:37 ` Stephen Hemminger
2026-09-21 14:42 ` Kishore Padmanabha
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.