Skip to content

Commit

Permalink
common/nfp: use new kvargs process API
Browse files Browse the repository at this point in the history
The nfp_parse_class_options() function could handle both key=value and
only-key, so it should use rte_kvargs_process_opt() instead of
rte_kvargs_process() to parse.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Chaoyong He <chaoyong.he@corigine.com>
  • Loading branch information
fengchengwen authored and david-marchand committed Oct 11, 2024
1 parent 4ed3061 commit 3977d07
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/common/nfp/nfp_common_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,8 @@ nfp_parse_class_options(const struct rte_devargs *devargs)
if (kvargs == NULL)
return dev_class;

if (rte_kvargs_count(kvargs, RTE_DEVARGS_KEY_CLASS) != 0) {
rte_kvargs_process(kvargs, RTE_DEVARGS_KEY_CLASS,
nfp_kvarg_dev_class_handler, &dev_class);
}
rte_kvargs_process_opt(kvargs, RTE_DEVARGS_KEY_CLASS,
nfp_kvarg_dev_class_handler, &dev_class);

rte_kvargs_free(kvargs);

Expand Down

0 comments on commit 3977d07

Please sign in to comment.