src/dpdk/lib/librte_graph/graph_ops.c
int
graph_node_has_edge_to_src_node(struct graph *graph)
{
	struct graph_node *graph_node;
	struct node *node;
	rte_edge_t i;

	STAILQ_FOREACH(graph_node, &graph->node_list, next) {
		for (i = 0; i < graph_node->node->nb_edges; i++) {
			node = graph_node->adjacency_list[i]->node;
			if (node->flags & RTE_NODE_SOURCE_F)
				SET_ERR_JMP(
					EEXIST, fail,
					"Node %s points to the source node %s",
					graph_node->node->name, node->name);
		}
	}

	return 0;
fail:
	return 1;
}
/* Check whether a node has next_node to a source node */
Check whether a node has next_node to a source node
Check whether a node has next_node to a source node
int
graph_node_has_edge_to_src_node(struct graph *graph)
{
	struct graph_node *graph_node;
	struct node *node;
	rte_edge_t i;
	STAILQ_FOREACH(graph_node, &graph->node_list, next) {
		for (i = 0; i < graph_node->node->nb_edges; i++) {
			node = graph_node->adjacency_list[i]->node;
			if (node->flags & RTE_NODE_SOURCE_F)
				SET_ERR_JMP(
					EEXIST, fail,
					"Node %s points to the source node %s",
					graph_node->node->name, node->name);
		}
	}
	return 0;
fail:
	return 1;
}
int graph_node_has_edge_to_src_node ( struct graph * graph ) { struct graph_node * graph_node ; struct node * node ; rte_edge_t i ; STAILQ_FOREACH ( graph_node , & graph -> node_list , next ) { for ( i = 0 ; i < graph_node -> node -> nb_edges ; i ++ ) { node = graph_node -> adjacency_list [ i ] -> node ; if ( node -> flags & RTE_NODE_SOURCE_F ) SET_ERR_JMP ( EEXIST , fail , " " , graph_node -> node -> name , node -> name ) ; } } return 0 ; fail : return 1 ; }
Check whether a node has next_node to a source node
Check whether a node has next_node to a source node