app/testpmd: rename function for detaching by devargs

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@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
Thomas Monjalon 2020-02-13 16:52:25 +01:00 committed by Ferruh Yigit
parent c8743d5f15
commit 5edee5f6da
3 changed files with 3 additions and 3 deletions

View File

@ -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");
}

View File

@ -2683,7 +2683,7 @@ detach_port_device(portid_t port_id)
}
void
detach_device(char *identifier)
detach_devargs(char *identifier)
{
struct rte_dev_iterator iterator;
struct rte_devargs da;

View File

@ -813,7 +813,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);