| 138 | } |
| 139 | |
| 140 | static int |
| 141 | graph_node_edges_add(struct graph *graph) |
| 142 | { |
| 143 | struct graph_node *graph_node; |
| 144 | struct node *adjacency; |
| 145 | const char *next; |
| 146 | rte_edge_t i; |
| 147 | |
| 148 | STAILQ_FOREACH(graph_node, &graph->node_list, next) { |
| 149 | for (i = 0; i < graph_node->node->nb_edges; i++) { |
| 150 | next = graph_node->node->next_nodes[i]; |
| 151 | adjacency = node_from_name(next); |
| 152 | if (adjacency == NULL) |
| 153 | SET_ERR_JMP(EINVAL, fail, |
| 154 | "Node %s not registered", next); |
| 155 | if (graph_node_add(graph, adjacency)) |
| 156 | goto fail; |
| 157 | } |
| 158 | } |
| 159 | return 0; |
| 160 | fail: |
| 161 | return -rte_errno; |
| 162 | } |
| 163 | |
| 164 | static int |
| 165 | graph_adjacency_list_update(struct graph *graph) |
no test coverage detected