[v5,3/5] net/tap: use new API to parse kvargs
Checks
Commit Message
Some kvargs could be key=value or only-key, it should use
rte_kvargs_process_opt() instead of rte_kvargs_process() to handle
these kvargs.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
drivers/net/tap/rte_eth_tap.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
@@ -2292,7 +2292,7 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev)
kvlist = rte_kvargs_parse(params, valid_arguments);
if (kvlist) {
if (rte_kvargs_count(kvlist, ETH_TAP_IFACE_ARG) == 1) {
- ret = rte_kvargs_process(kvlist,
+ ret = rte_kvargs_process_opt(kvlist,
ETH_TAP_IFACE_ARG,
&set_interface_name,
tun_name);
@@ -2496,10 +2496,10 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
kvlist = rte_kvargs_parse(params, valid_arguments);
if (kvlist) {
if (rte_kvargs_count(kvlist, ETH_TAP_IFACE_ARG) == 1) {
- ret = rte_kvargs_process(kvlist,
- ETH_TAP_IFACE_ARG,
- &set_interface_name,
- tap_name);
+ ret = rte_kvargs_process_opt(kvlist,
+ ETH_TAP_IFACE_ARG,
+ &set_interface_name,
+ tap_name);
if (ret == -1)
goto leave;
}