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

Function cmd_thread_pipeline_disable

dpdk/examples/ip_pipeline/cli.c:5898–5936  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5896"thread <thread_id> pipeline <pipeline_name> disable\n";
5897
5898static void
5899cmd_thread_pipeline_disable(char **tokens,
5900 uint32_t n_tokens,
5901 char *out,
5902 size_t out_size)
5903{
5904 char *pipeline_name;
5905 uint32_t thread_id;
5906 int status;
5907
5908 if (n_tokens != 5) {
5909 snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
5910 return;
5911 }
5912
5913 if (parser_read_uint32(&thread_id, tokens[1]) != 0) {
5914 snprintf(out, out_size, MSG_ARG_INVALID, "thread_id");
5915 return;
5916 }
5917
5918 if (strcmp(tokens[2], "pipeline") != 0) {
5919 snprintf(out, out_size, MSG_ARG_NOT_FOUND, "pipeline");
5920 return;
5921 }
5922
5923 pipeline_name = tokens[3];
5924
5925 if (strcmp(tokens[4], "disable") != 0) {
5926 snprintf(out, out_size, MSG_ARG_NOT_FOUND, "disable");
5927 return;
5928 }
5929
5930 status = thread_pipeline_disable(thread_id, pipeline_name);
5931 if (status) {
5932 snprintf(out, out_size, MSG_CMD_FAIL,
5933 "thread pipeline disable");
5934 return;
5935 }
5936}
5937
5938static void
5939cmd_help(char **tokens, uint32_t n_tokens, char *out, size_t out_size)

Callers 1

cli_processFunction · 0.85

Calls 4

snprintfFunction · 0.85
strcmpFunction · 0.85
thread_pipeline_disableFunction · 0.85
parser_read_uint32Function · 0.70

Tested by

no test coverage detected