| 3381 | }; |
| 3382 | |
| 3383 | static void |
| 3384 | cmd_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 | |
| 3411 | static cmdline_parse_token_string_t cmd_config_threshold_port = |
| 3412 | TOKEN_STRING_INITIALIZER(struct cmd_config_threshold, port, "port"); |
nothing calls this directly
no test coverage detected