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

Function node_has_loop_edge

dpdk/lib/graph/graph_ops.c:14–32  ·  view source on GitHub ↗

Check whether a node has next_node to itself */

Source from the content-addressed store, hash-verified

12
13/* Check whether a node has next_node to itself */
14static inline int
15node_has_loop_edge(struct node *node)
16{
17 rte_edge_t i;
18 char *name;
19 int rc = 0;
20
21 for (i = 0; i < node->nb_edges; i++) {
22 if (strncmp(node->name, node->next_nodes[i],
23 RTE_NODE_NAMESIZE) == 0) {
24 name = node->name;
25 rc = 1;
26 SET_ERR_JMP(EINVAL, fail, "Node %s has loop to self",
27 name);
28 }
29 }
30fail:
31 return rc;
32}
33
34int
35graph_node_has_loop_edge(struct graph *graph)

Callers 1

graph_node_has_loop_edgeFunction · 0.85

Calls 1

strncmpFunction · 0.85

Tested by

no test coverage detected