[dpdk-dev] [PATCH 1/2] app/testpmd: rename function for detaching by devargs
Thomas Monjalon
thomas at monjalon.net
Thu Feb 13 16:52:25 CET 2020
There is a function detach_port_device() which takes a port_id,
and a function detach_device() which takes a devargs string.
In order to add a third function accepting a rte_device pointer,
the function detach_device() is renamed into detach_devargs().
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
app/test-pmd/cmdline.c | 2 +-
app/test-pmd/testpmd.c | 3 ++-
app/test-pmd/testpmd.h | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 99e4168103..38b6d804c6 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1541,7 +1541,7 @@ static void cmd_operate_detach_device_parsed(void *parsed_result,
struct cmd_operate_detach_device_result *res = parsed_result;
if (!strcmp(res->keyword, "detach"))
- detach_device(res->identifier);
+ detach_devargs(res->identifier);
else
printf("Unknown parameter\n");
}
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index a1dd4043e0..11203cb03d 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2683,7 +2683,8 @@ detach_port_device(portid_t port_id)
}
void
-detach_device(char *identifier)
+void
+detach_devargs(char *identifier)
{
struct rte_dev_iterator iterator;
struct rte_devargs da;
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 3dd5fc750b..b8eb28f62b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -810,7 +810,7 @@ void stop_port(portid_t pid);
void close_port(portid_t pid);
void reset_port(portid_t pid);
void attach_port(char *identifier);
-void detach_device(char *identifier);
+void detach_devargs(char *identifier);
void detach_port_device(portid_t port_id);
int all_ports_stopped(void);
int port_is_stopped(portid_t port_id);
--
2.25.0
More information about the dev
mailing list