Skip to content

Commit 3977d07

Browse files
fengchengwendavid-marchand
authored andcommitted
common/nfp: use new kvargs process API
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 <[email protected]> Acked-by: Chaoyong He <[email protected]>
1 parent 4ed3061 commit 3977d07

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/common/nfp/nfp_common_pci.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,8 @@ nfp_parse_class_options(const struct rte_devargs *devargs)
170170
if (kvargs == NULL)
171171
return dev_class;
172172

173-
if (rte_kvargs_count(kvargs, RTE_DEVARGS_KEY_CLASS) != 0) {
174-
rte_kvargs_process(kvargs, RTE_DEVARGS_KEY_CLASS,
175-
nfp_kvarg_dev_class_handler, &dev_class);
176-
}
173+
rte_kvargs_process_opt(kvargs, RTE_DEVARGS_KEY_CLASS,
174+
nfp_kvarg_dev_class_handler, &dev_class);
177175

178176
rte_kvargs_free(kvargs);
179177

0 commit comments

Comments
 (0)