| 389 | } |
| 390 | |
| 391 | static void |
| 392 | cli_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 | |
| 427 | static void |
| 428 | cli_graph_help(__rte_unused void *parsed_result, __rte_unused struct cmdline *cl, |
nothing calls this directly
no test coverage detected