48 lines
1.6 KiB
Diff
48 lines
1.6 KiB
Diff
|
|
From b3dd6876cdd40346cc7282955b8cc31401cffb31 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Chengwen Feng <fengchengwen@huawei.com>
|
||
|
|
Date: Wed, 9 Oct 2024 04:50:29 +0000
|
||
|
|
Subject: [PATCH] net/tap: use new kvargs process API
|
||
|
|
|
||
|
|
[ upstream commit 4ed306131f85ef180589169b868f292d9149b0c7 ]
|
||
|
|
|
||
|
|
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(-)
|
||
|
|
|
||
|
|
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
|
||
|
|
index b41fa97..cdb52cf 100644
|
||
|
|
--- a/drivers/net/tap/rte_eth_tap.c
|
||
|
|
+++ b/drivers/net/tap/rte_eth_tap.c
|
||
|
|
@@ -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;
|
||
|
|
}
|
||
|
|
--
|
||
|
|
2.33.0
|
||
|
|
|