| 393 | " <tc_period>\n"; |
| 394 | |
| 395 | static void |
| 396 | cmd_tmgr_subport_profile(char **tokens, |
| 397 | uint32_t n_tokens, |
| 398 | char *out, |
| 399 | size_t out_size) |
| 400 | { |
| 401 | struct rte_sched_subport_profile_params subport_profile; |
| 402 | int status, i; |
| 403 | |
| 404 | if (n_tokens != 19) { |
| 405 | snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); |
| 406 | return; |
| 407 | } |
| 408 | |
| 409 | if (parser_read_uint64(&subport_profile.tb_rate, tokens[3]) != 0) { |
| 410 | snprintf(out, out_size, MSG_ARG_INVALID, "tb_rate"); |
| 411 | return; |
| 412 | } |
| 413 | |
| 414 | if (parser_read_uint64(&subport_profile.tb_size, tokens[4]) != 0) { |
| 415 | snprintf(out, out_size, MSG_ARG_INVALID, "tb_size"); |
| 416 | return; |
| 417 | } |
| 418 | |
| 419 | for (i = 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++) |
| 420 | if (parser_read_uint64(&subport_profile.tc_rate[i], |
| 421 | tokens[5 + i]) != 0) { |
| 422 | snprintf(out, out_size, MSG_ARG_INVALID, "tc_rate"); |
| 423 | return; |
| 424 | } |
| 425 | |
| 426 | if (parser_read_uint64(&subport_profile.tc_period, tokens[18]) != 0) { |
| 427 | snprintf(out, out_size, MSG_ARG_INVALID, "tc_period"); |
| 428 | return; |
| 429 | } |
| 430 | |
| 431 | status = tmgr_subport_profile_add(&subport_profile); |
| 432 | if (status != 0) { |
| 433 | snprintf(out, out_size, MSG_CMD_FAIL, tokens[0]); |
| 434 | return; |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | static const char cmd_tmgr_pipe_profile_help[] = |
| 439 | "tmgr pipe profile\n" |
no test coverage detected