src/dpdk/lib/librte_graph/graph_ops.c
int
graph_has_isolated_node(struct graph *graph)
{
	struct graph_node *graph_node;

	graph_mark_nodes_as_not_visited(graph);

	STAILQ_FOREACH(graph_node, &graph->node_list, next) {
		if (graph_node->node->flags & RTE_NODE_SOURCE_F) {
			if (graph_node->node->nb_edges == 0)
				SET_ERR_JMP(EINVAL, fail,
					    "%s node needs minimum one edge",
					    graph_node->node->name);
			if (graph_bfs(graph, graph_node))
				goto fail;
		}
	}

	STAILQ_FOREACH(graph_node, &graph->node_list, next)
		if (graph_node->visited == false)
			SET_ERR_JMP(EINVAL, fail, "Found isolated node %s",
				    graph_node->node->name);

	return 0;
fail:
	return 1;
}
/* Check whether a node has connected path or parent node */
Check whether a node has connected path or parent node
Check whether a node has connected path or parent node
int
graph_has_isolated_node(struct graph *graph)
{
	struct graph_node *graph_node;
	graph_mark_nodes_as_not_visited(graph);
	STAILQ_FOREACH(graph_node, &graph->node_list, next) {
		if (graph_node->node->flags & RTE_NODE_SOURCE_F) {
			if (graph_node->node->nb_edges == 0)
				SET_ERR_JMP(EINVAL, fail,
					    "%s node needs minimum one edge",
					    graph_node->node->name);
			if (graph_bfs(graph, graph_node))
				goto fail;
		}
	}
	STAILQ_FOREACH(graph_node, &graph->node_list, next)
		if (graph_node->visited == false)
			SET_ERR_JMP(EINVAL, fail, "Found isolated node %s",
				    graph_node->node->name);
	return 0;
fail:
	return 1;
}
int graph_has_isolated_node ( struct graph * graph ) { struct graph_node * graph_node ; graph_mark_nodes_as_not_visited ( graph ) ; STAILQ_FOREACH ( graph_node , & graph -> node_list , next ) { if ( graph_node -> node -> flags & RTE_NODE_SOURCE_F ) { if ( graph_node -> node -> nb_edges == 0 ) SET_ERR_JMP ( EINVAL , fail , " " , graph_node -> node -> name ) ; if ( graph_bfs ( graph , graph_node ) ) goto fail ; } } STAILQ_FOREACH ( graph_node , & graph -> node_list , next ) if ( graph_node -> visited == false ) SET_ERR_JMP ( EINVAL , fail , " " , graph_node -> node -> name ) ; return 0 ; fail : return 1 ; }
Check whether a node has connected path or parent node
Check whether a node has connected path or parent node