| 299 | } |
| 300 | |
| 301 | static int |
| 302 | expand_pattern_to_cluster(struct cluster *cluster, const char *pattern) |
| 303 | { |
| 304 | struct graph_head *graph_head = graph_list_head_get(); |
| 305 | struct graph *graph; |
| 306 | bool found = false; |
| 307 | |
| 308 | /* Check for pattern match */ |
| 309 | STAILQ_FOREACH(graph, graph_head, next) { |
| 310 | if (fnmatch(pattern, graph->name, 0) == 0) { |
| 311 | if (cluster_add(cluster, graph)) |
| 312 | goto fail; |
| 313 | found = true; |
| 314 | } |
| 315 | } |
| 316 | if (found == false) |
| 317 | SET_ERR_JMP(EFAULT, fail, "Pattern %s graph not found", |
| 318 | pattern); |
| 319 | |
| 320 | return 0; |
| 321 | fail: |
| 322 | return -rte_errno; |
| 323 | } |
| 324 | |
| 325 | struct rte_graph_cluster_stats * |
| 326 | rte_graph_cluster_stats_create(const struct rte_graph_cluster_stats_param *prm) |
no test coverage detected