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

Function rte_node_edge_get

dpdk/lib/graph/node.c:328–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328rte_node_t
329rte_node_edge_get(rte_node_t id, char *next_nodes[])
330{
331 rte_node_t rc = RTE_NODE_ID_INVALID;
332 struct node *node;
333
334 NODE_ID_CHECK(id);
335 graph_spinlock_lock();
336
337 STAILQ_FOREACH(node, &node_list, next) {
338 if (node->id == id) {
339 if (next_nodes == NULL)
340 rc = sizeof(char *) * node->nb_edges;
341 else
342 rc = node_copy_edges(node, next_nodes);
343 break;
344 }
345 }
346
347 graph_spinlock_unlock();
348fail:
349 return rc;
350}
351
352static void
353node_scan_dump(FILE *f, rte_node_t id, bool all)

Callers 1

test_lookup_functionsFunction · 0.85

Calls 3

graph_spinlock_lockFunction · 0.85
node_copy_edgesFunction · 0.85
graph_spinlock_unlockFunction · 0.85

Tested by 1

test_lookup_functionsFunction · 0.68