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

Function cmd_thread_pipeline_enable

dpdk/examples/ip_pipeline/cli.c:5855–5892  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5853"thread <thread_id> pipeline <pipeline_name> enable\n";
5854
5855static void
5856cmd_thread_pipeline_enable(char **tokens,
5857 uint32_t n_tokens,
5858 char *out,
5859 size_t out_size)
5860{
5861 char *pipeline_name;
5862 uint32_t thread_id;
5863 int status;
5864
5865 if (n_tokens != 5) {
5866 snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
5867 return;
5868 }
5869
5870 if (parser_read_uint32(&thread_id, tokens[1]) != 0) {
5871 snprintf(out, out_size, MSG_ARG_INVALID, "thread_id");
5872 return;
5873 }
5874
5875 if (strcmp(tokens[2], "pipeline") != 0) {
5876 snprintf(out, out_size, MSG_ARG_NOT_FOUND, "pipeline");
5877 return;
5878 }
5879
5880 pipeline_name = tokens[3];
5881
5882 if (strcmp(tokens[4], "enable") != 0) {
5883 snprintf(out, out_size, MSG_ARG_NOT_FOUND, "enable");
5884 return;
5885 }
5886
5887 status = thread_pipeline_enable(thread_id, pipeline_name);
5888 if (status) {
5889 snprintf(out, out_size, MSG_CMD_FAIL, "thread pipeline enable");
5890 return;
5891 }
5892}
5893
5894
5895static const char cmd_thread_pipeline_disable_help[] =

Callers 1

cli_processFunction · 0.85

Calls 4

snprintfFunction · 0.85
strcmpFunction · 0.85
thread_pipeline_enableFunction · 0.85
parser_read_uint32Function · 0.70

Tested by

no test coverage detected