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

Function cmd_tmgr_subport

dpdk/examples/ip_pipeline/cli.c:598–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

596" profile <subport_profile_id>\n";
597
598static void
599cmd_tmgr_subport(char **tokens,
600 uint32_t n_tokens,
601 char *out,
602 size_t out_size)
603{
604 uint32_t subport_id, subport_profile_id;
605 int status;
606 char *name;
607
608 if (n_tokens != 6) {
609 snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
610 return;
611 }
612
613 name = tokens[1];
614
615 if (parser_read_uint32(&subport_id, tokens[3]) != 0) {
616 snprintf(out, out_size, MSG_ARG_INVALID, "subport_id");
617 return;
618 }
619
620 if (parser_read_uint32(&subport_profile_id, tokens[5]) != 0) {
621 snprintf(out, out_size, MSG_ARG_INVALID, "subport_profile_id");
622 return;
623 }
624
625 status = tmgr_subport_config(name, subport_id, subport_profile_id);
626 if (status) {
627 snprintf(out, out_size, MSG_CMD_FAIL, tokens[0]);
628 return;
629 }
630}
631
632
633static const char cmd_tmgr_subport_pipe_help[] =

Callers 1

cli_processFunction · 0.85

Calls 3

snprintfFunction · 0.85
tmgr_subport_configFunction · 0.85
parser_read_uint32Function · 0.70

Tested by

no test coverage detected