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

Function cli_graph

dpdk/app/graph/graph.c:391–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391static void
392cli_graph(void *parsed_result, __rte_unused struct cmdline *cl, __rte_unused void *data)
393{
394 struct graph_config_cmd_tokens *res = parsed_result;
395 struct graph_config config;
396 char *model_name;
397 uint8_t model;
398 int rc;
399
400 model_name = res->model_name;
401 if (strcmp(model_name, "default") == 0) {
402 model = GRAPH_MODEL_RTC;
403 } else if (strcmp(model_name, "rtc") == 0) {
404 model = GRAPH_MODEL_RTC;
405 } else if (strcmp(model_name, "mcd") == 0) {
406 model = GRAPH_MODEL_MCD;
407 } else {
408 printf(MSG_ARG_NOT_FOUND, "model arguments");
409 return;
410 }
411
412 config.params.bsz = res->size;
413 config.params.tmo = res->ns;
414 config.params.coremask = res->mask;
415 config.model = model;
416 config.pcap_ena = res->pcap_ena;
417 config.num_pcap_pkts = res->num_pcap_pkts;
418 config.pcap_file = res->pcap_file;
419 rc = graph_config_add(res->usecase, &config);
420 if (rc < 0) {
421 cli_exit();
422 printf(MSG_CMD_FAIL, res->graph);
423 rte_exit(EXIT_FAILURE, "coremask is Invalid\n");
424 }
425}
426
427static void
428cli_graph_help(__rte_unused void *parsed_result, __rte_unused struct cmdline *cl,

Callers

nothing calls this directly

Calls 5

strcmpFunction · 0.85
graph_config_addFunction · 0.85
cli_exitFunction · 0.85
rte_exitFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected