src/dpdk/drivers/net/ice/base/ice_sched.c
static enum ice_status
ice_sched_add_vsi_support_nodes(struct ice_port_info *pi, u16 vsi_handle,
				struct ice_sched_node *tc_node, u16 *num_nodes)
{
	struct ice_sched_node *parent = tc_node;
	enum ice_status status;
	u32 first_node_teid;
	u16 num_added = 0;
	u8 i, vsil;

	if (!pi)
		return ICE_ERR_PARAM;

	vsil = ice_sched_get_vsi_layer(pi->hw);
	for (i = pi->hw->sw_entry_point_layer; i <= vsil; i++) {
		status = ice_sched_add_nodes_to_layer(pi, tc_node, parent,
						      i, num_nodes[i],
						      &first_node_teid,
						      &num_added);
		if (status != ICE_SUCCESS || num_nodes[i] != num_added)
			return ICE_ERR_CFG;

		/* The newly added node can be a new parent for the next
		 * layer nodes
		 */
		if (num_added)
			parent = ice_sched_find_node_by_teid(tc_node,
							     first_node_teid);
		else
			parent = parent->children[0];

		if (!parent)
			return ICE_ERR_CFG;

		if (i == vsil)
			parent->vsi_handle = vsi_handle;
	}

	return ICE_SUCCESS;
}
/**
 * ice_sched_add_vsi_support_nodes - add VSI supported nodes into Tx tree
 * @pi: port information structure
 * @vsi_handle: software VSI handle
 * @tc_node: pointer to TC node
 * @num_nodes: pointer to num nodes array
 *
 * This function adds the VSI supported nodes into Tx tree including the
 * VSI, its parent and intermediate nodes in below layers
 */
add VSI supported nodes into Tx tree
@pi: port information structure
@vsi_handle: software VSI handle
@tc_node: pointer to TC node
@num_nodes: pointer to num nodes array

This function adds the VSI supported nodes into Tx tree including the
VSI, its parent and intermediate nodes in below layers
add VSI supported nodes into Tx tree @pi : port information structure @vsi_handle : software VSI handle @tc_node : pointer to TC node @num_nodes : pointer to num nodes array This function adds the VSI supported nodes into Tx tree including the VSI its parent and intermediate nodes in below layers
static enum ice_status
ice_sched_add_vsi_support_nodes(struct ice_port_info *pi, u16 vsi_handle,
				struct ice_sched_node *tc_node, u16 *num_nodes)
{
	struct ice_sched_node *parent = tc_node;
	enum ice_status status;
	u32 first_node_teid;
	u16 num_added = 0;
	u8 i, vsil;
	if (!pi)
		return ICE_ERR_PARAM;
	vsil = ice_sched_get_vsi_layer(pi->hw);
	for (i = pi->hw->sw_entry_point_layer; i <= vsil; i++) {
		status = ice_sched_add_nodes_to_layer(pi, tc_node, parent,
						      i, num_nodes[i],
						      &first_node_teid,
						      &num_added);
		if (status != ICE_SUCCESS || num_nodes[i] != num_added)
			return ICE_ERR_CFG;
		if (num_added)
			parent = ice_sched_find_node_by_teid(tc_node,
							     first_node_teid);
		else
			parent = parent->children[0];
		if (!parent)
			return ICE_ERR_CFG;
		if (i == vsil)
			parent->vsi_handle = vsi_handle;
	}
	return ICE_SUCCESS;
}
static enum ice_status ice_sched_add_vsi_support_nodes ( struct ice_port_info * pi , u16 vsi_handle , struct ice_sched_node * tc_node , u16 * num_nodes ) { struct ice_sched_node * parent = tc_node ; enum ice_status status ; u32 first_node_teid ; u16 num_added = 0 ; u8 i , vsil ; if ( ! pi ) return ICE_ERR_PARAM ; vsil = ice_sched_get_vsi_layer ( pi -> hw ) ; for ( i = pi -> hw -> sw_entry_point_layer ; i <= vsil ; i ++ ) { status = ice_sched_add_nodes_to_layer ( pi , tc_node , parent , i , num_nodes [ i ] , & first_node_teid , & num_added ) ; if ( status != ICE_SUCCESS || num_nodes [ i ] != num_added ) return ICE_ERR_CFG ; if ( num_added ) parent = ice_sched_find_node_by_teid ( tc_node , first_node_teid ) ; else parent = parent -> children [ 0 ] ; if ( ! parent ) return ICE_ERR_CFG ; if ( i == vsil ) parent -> vsi_handle = vsi_handle ; } return ICE_SUCCESS ; }
ice_sched_add_vsi_support_nodes - add VSI supported nodes into Tx tree
 @pi: port information structure
 @vsi_handle: software VSI handle
 @tc_node: pointer to TC node
 @num_nodes: pointer to num nodes array
ice_sched_add_vsi_support_nodes - add VSI supported nodes into Tx tree @pi : port information structure @vsi_handle : software VSI handle @tc_node : pointer to TC node @num_nodes : pointer to num nodes array
/* The newly added node can be a new parent for the next
		 * layer nodes
		 */