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

Function parser_usecases_read

dpdk/app/graph/graph.c:101–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101static bool
102parser_usecases_read(char *usecases)
103{
104 bool valid = false;
105 uint32_t i, j = 0;
106 char *token;
107
108 token = strtok(usecases, ",");
109 while (token != NULL) {
110 for (i = 0; i < RTE_DIM(supported_usecases); i++) {
111 if (strcmp(supported_usecases[i], token) == 0) {
112 graph_config.usecases[j].enabled = true;
113 rte_strscpy(graph_config.usecases[j].name, token, 31);
114 valid = true;
115 j++;
116 break;
117 }
118 }
119 token = strtok(NULL, ",");
120 }
121
122 return valid;
123}
124
125static uint64_t
126graph_worker_count_get(void)

Callers 1

graph_config_addFunction · 0.85

Calls 3

strtokFunction · 0.85
strcmpFunction · 0.85
rte_strscpyFunction · 0.85

Tested by

no test coverage detected