[v4,2/5] net/sfc: use new API to parse kvargs
Checks
Commit Message
The sfc_kvargs_process() and sfc_efx_dev_class_get() function could
handle both key=value and only-key, so they should use
rte_kvargs_process_opt() instead of rte_kvargs_process() to parse.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
drivers/common/sfc_efx/sfc_efx.c | 4 ++--
drivers/net/sfc/sfc_kvargs.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
@@ -52,8 +52,8 @@ sfc_efx_dev_class_get(struct rte_devargs *devargs)
return dev_class;
if (rte_kvargs_count(kvargs, RTE_DEVARGS_KEY_CLASS) != 0) {
- rte_kvargs_process(kvargs, RTE_DEVARGS_KEY_CLASS,
- sfc_efx_kvarg_dev_class_handler, &dev_class);
+ rte_kvargs_process_opt(kvargs, RTE_DEVARGS_KEY_CLASS,
+ sfc_efx_kvarg_dev_class_handler, &dev_class);
}
rte_kvargs_free(kvargs);
@@ -70,7 +70,7 @@ sfc_kvargs_process(struct sfc_adapter *sa, const char *key_match,
if (sa->kvargs == NULL)
return 0;
- return -rte_kvargs_process(sa->kvargs, key_match, handler, opaque_arg);
+ return -rte_kvargs_process_opt(sa->kvargs, key_match, handler, opaque_arg);
}
int