src/dpdk/drivers/net/ice/base/ice_sched.c
bool
ice_sched_find_node_in_subtree(struct ice_hw *hw, struct ice_sched_node *base,
			       struct ice_sched_node *node)
{
	u8 i;

	for (i = 0; i < base->num_children; i++) {
		struct ice_sched_node *child = base->children[i];

		if (node == child)
			return true;

		if (child->tx_sched_layer > node->tx_sched_layer)
			return false;

		/* this recursion is intentional, and wouldn't
		 * go more than 8 calls
		 */
		if (ice_sched_find_node_in_subtree(hw, child, node))
			return true;
	}
	return false;
}
/**
 * ice_sched_find_node_in_subtree - Find node in part of base node subtree
 * @hw: pointer to the HW struct
 * @base: pointer to the base node
 * @node: pointer to the node to search
 *
 * This function checks whether a given node is part of the base node
 * subtree or not
 */
Find node in part of base node subtree
@hw: pointer to the HW struct
@base: pointer to the base node
@node: pointer to the node to search

This function checks whether a given node is part of the base node
subtree or not
Find node in part of base node subtree @hw : pointer to the HW struct @base : pointer to the base node @node : pointer to the node to search This function checks whether a given node is part of the base node subtree or not
bool
ice_sched_find_node_in_subtree(struct ice_hw *hw, struct ice_sched_node *base,
			       struct ice_sched_node *node)
{
	u8 i;
	for (i = 0; i < base->num_children; i++) {
		struct ice_sched_node *child = base->children[i];
		if (node == child)
			return true;
		if (child->tx_sched_layer > node->tx_sched_layer)
			return false;
		if (ice_sched_find_node_in_subtree(hw, child, node))
			return true;
	}
	return false;
}
bool ice_sched_find_node_in_subtree ( struct ice_hw * hw , struct ice_sched_node * base , struct ice_sched_node * node ) { u8 i ; for ( i = 0 ; i < base -> num_children ; i ++ ) { struct ice_sched_node * child = base -> children [ i ] ; if ( node == child ) return true ; if ( child -> tx_sched_layer > node -> tx_sched_layer ) return false ; if ( ice_sched_find_node_in_subtree ( hw , child , node ) ) return true ; } return false ; }
ice_sched_find_node_in_subtree - Find node in part of base node subtree
 @hw: pointer to the HW struct
 @base: pointer to the base node
 @node: pointer to the node to search
ice_sched_find_node_in_subtree - Find node in part of base node subtree @hw : pointer to the HW struct @base : pointer to the base node @node : pointer to the node to search
/* this recursion is intentional, and wouldn't
		 * go more than 8 calls
		 */