| 508 | " cpu <cpu_id>\n"; |
| 509 | |
| 510 | static void |
| 511 | cmd_tmgr(char **tokens, |
| 512 | uint32_t n_tokens, |
| 513 | char *out, |
| 514 | size_t out_size) |
| 515 | { |
| 516 | struct tmgr_port_params p; |
| 517 | char *name; |
| 518 | struct tmgr_port *tmgr_port; |
| 519 | |
| 520 | if (n_tokens != 14) { |
| 521 | snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); |
| 522 | return; |
| 523 | } |
| 524 | |
| 525 | name = tokens[1]; |
| 526 | |
| 527 | if (strcmp(tokens[2], "rate") != 0) { |
| 528 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "rate"); |
| 529 | return; |
| 530 | } |
| 531 | |
| 532 | if (parser_read_uint64(&p.rate, tokens[3]) != 0) { |
| 533 | snprintf(out, out_size, MSG_ARG_INVALID, "rate"); |
| 534 | return; |
| 535 | } |
| 536 | |
| 537 | if (strcmp(tokens[4], "spp") != 0) { |
| 538 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "spp"); |
| 539 | return; |
| 540 | } |
| 541 | |
| 542 | if (parser_read_uint32(&p.n_subports_per_port, tokens[5]) != 0) { |
| 543 | snprintf(out, out_size, MSG_ARG_INVALID, "n_subports_per_port"); |
| 544 | return; |
| 545 | } |
| 546 | |
| 547 | if (strcmp(tokens[6], "pps") != 0) { |
| 548 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "spp"); |
| 549 | return; |
| 550 | } |
| 551 | |
| 552 | if (parser_read_uint32(&p.n_pipes_per_subport, tokens[7]) != 0) { |
| 553 | snprintf(out, out_size, MSG_ARG_INVALID, "n_pipes_per_subport"); |
| 554 | return; |
| 555 | } |
| 556 | |
| 557 | if (strcmp(tokens[8], "fo") != 0) { |
| 558 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "fo"); |
| 559 | return; |
| 560 | } |
| 561 | |
| 562 | if (parser_read_uint32(&p.frame_overhead, tokens[9]) != 0) { |
| 563 | snprintf(out, out_size, MSG_ARG_INVALID, "frame_overhead"); |
| 564 | return; |
| 565 | } |
| 566 | |
| 567 | if (strcmp(tokens[10], "mtu") != 0) { |
no test coverage detected