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

Function cmd_config_threshold_parsed

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

Source from the content-addressed store, hash-verified

3381};
3382
3383static void
3384cmd_config_threshold_parsed(void *parsed_result,
3385 __rte_unused struct cmdline *cl,
3386 __rte_unused void *data)
3387{
3388 struct cmd_config_threshold *res = parsed_result;
3389
3390 if (!all_ports_stopped()) {
3391 fprintf(stderr, "Please stop all ports first\n");
3392 return;
3393 }
3394
3395 if (!strcmp(res->name, "txfreet"))
3396 tx_free_thresh = res->value;
3397 else if (!strcmp(res->name, "txrst"))
3398 tx_rs_thresh = res->value;
3399 else if (!strcmp(res->name, "rxfreet"))
3400 rx_free_thresh = res->value;
3401 else {
3402 fprintf(stderr, "Unknown parameter\n");
3403 return;
3404 }
3405
3406 init_port_config();
3407
3408 cmd_reconfig_device_queue(RTE_PORT_ALL, 1, 1);
3409}
3410
3411static cmdline_parse_token_string_t cmd_config_threshold_port =
3412 TOKEN_STRING_INITIALIZER(struct cmd_config_threshold, port, "port");

Callers

nothing calls this directly

Calls 4

all_ports_stoppedFunction · 0.85
strcmpFunction · 0.85
init_port_configFunction · 0.85

Tested by

no test coverage detected