#include "commands.h"
struct cmdline *cl,
{
cmdline_printf(cl,
"commands:\n"
"- attach <devargs>\n"
"- detach <devargs>\n"
"- list\n\n");
}
void
struct cmdline *cl,
{
cmdline_quit(cl);
}
void
struct cmdline *cl,
{
uint16_t port_id;
char dev_name[RTE_DEV_NAME_MAX_LEN];
cmdline_printf(cl, "list all etherdev\n");
if (strlen(dev_name) > 0)
cmdline_printf(cl, "%d\t%s\n", port_id, dev_name);
else
printf("empty dev_name is not expected!\n");
}
}
void
cmd_attach_parsed(void *parsed_result,
struct cmdline *cl,
{
struct cmd_attach_result *res = parsed_result;
memset(&da, 0, sizeof(da));
cmdline_printf(cl, "cannot parse devargs\n");
return;
}
cmdline_printf(cl,
"attached device %s\n", da.
name);
else
cmdline_printf(cl, "failed to attached device %s\n",
}
void
cmd_detach_parsed(void *parsed_result,
struct cmdline *cl,
{
struct cmd_detach_result *res = parsed_result;
memset(&da, 0, sizeof(da));
cmdline_printf(cl, "cannot parse devargs\n");
return;
}
printf("detaching...\n");
cmdline_printf(cl, "detached device %s\n",
else
cmdline_printf(cl, "failed to detach device %s\n",
}