MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cmd_config_speed_specific_parsed

Function cmd_config_speed_specific_parsed

dpdk/app/test-pmd/cmdline.c:1491–1514  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1489};
1490
1491static void
1492cmd_config_speed_specific_parsed(void *parsed_result,
1493 __rte_unused struct cmdline *cl,
1494 __rte_unused void *data)
1495{
1496 struct cmd_config_speed_specific *res = parsed_result;
1497 uint32_t link_speed;
1498
1499 if (port_id_is_invalid(res->id, ENABLED_WARN))
1500 return;
1501
1502 if (!port_is_stopped(res->id)) {
1503 fprintf(stderr, "Please stop port %d first\n", res->id);
1504 return;
1505 }
1506
1507 if (parse_and_check_speed_duplex(res->value1, res->value2,
1508 &link_speed) < 0)
1509 return;
1510
1511 ports[res->id].dev_conf.link_speeds = link_speed;
1512
1513 cmd_reconfig_device_queue(RTE_PORT_ALL, 1, 1);
1514}
1515
1516
1517static cmdline_parse_token_string_t cmd_config_speed_specific_port =

Callers

nothing calls this directly

Calls 4

port_id_is_invalidFunction · 0.85
port_is_stoppedFunction · 0.85

Tested by

no test coverage detected