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

Function graph_adjacency_list_update

dpdk/lib/graph/graph.c:164–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164static int
165graph_adjacency_list_update(struct graph *graph)
166{
167 struct graph_node *graph_node, *tmp;
168 struct node *adjacency;
169 const char *next;
170 rte_edge_t i;
171
172 STAILQ_FOREACH(graph_node, &graph->node_list, next) {
173 for (i = 0; i < graph_node->node->nb_edges; i++) {
174 next = graph_node->node->next_nodes[i];
175 adjacency = node_from_name(next);
176 if (adjacency == NULL)
177 SET_ERR_JMP(EINVAL, fail,
178 "Node %s not registered", next);
179 tmp = node_to_graph_node(graph, adjacency);
180 if (tmp == NULL)
181 goto fail;
182 graph_node->adjacency_list[i] = tmp;
183 }
184 }
185
186 return 0;
187fail:
188 return -rte_errno;
189}
190
191static int
192expand_pattern_to_node(struct graph *graph, const char *pattern)

Callers 2

rte_graph_createFunction · 0.85
graph_cloneFunction · 0.85

Calls 2

node_from_nameFunction · 0.85
node_to_graph_nodeFunction · 0.85

Tested by

no test coverage detected