struct cmd_operate_attach_port_result {
cmdline_fixed_string_t port;
cmdline_fixed_string_t keyword;
- cmdline_fixed_string_t identifier;
+ cmdline_multi_string_t identifier;
};
static void cmd_operate_attach_port_parsed(void *parsed_result,
keyword, "attach");
cmdline_parse_token_string_t cmd_operate_attach_port_identifier =
TOKEN_STRING_INITIALIZER(struct cmd_operate_attach_port_result,
- identifier, NULL);
+ identifier, TOKEN_STRING_MULTI);
cmdline_parse_inst_t cmd_operate_attach_port = {
.f = cmd_operate_attach_port_parsed,
{
struct cmd_operate_detach_port_result *res = parsed_result;
- if (!strcmp(res->keyword, "detach"))
+ if (!strcmp(res->keyword, "detach")) {
+ RTE_ETH_VALID_PORTID_OR_RET(res->port_id);
detach_port_device(res->port_id);
- else
+ } else {
printf("Unknown parameter\n");
+ }
}
cmdline_parse_token_string_t cmd_operate_detach_port_port =
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");
}
{RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL}
};
+ memset(&pfc_conf, 0, sizeof(struct rte_eth_pfc_conf));
rx_fc_enable = (!strncmp(res->rx_pfc_mode, "on",2)) ? 1 : 0;
tx_fc_enable = (!strncmp(res->tx_pfc_mode, "on",2)) ? 1 : 0;
pfc_conf.fc.mode = rx_tx_onoff_2_pfc_mode[rx_fc_enable][tx_fc_enable];