src/dpdk/drivers/net/ice/base/ice_sched.c
static enum ice_status
ice_sched_add_vsi_to_topo(struct ice_port_info *pi, u16 vsi_handle, u8 tc)
{
	u16 num_nodes[ICE_AQC_TOPO_MAX_LEVEL_NUM] = { 0 };
	struct ice_sched_node *tc_node;

	tc_node = ice_sched_get_tc_node(pi, tc);
	if (!tc_node)
		return ICE_ERR_PARAM;

	/* calculate number of supported nodes needed for this VSI */
	ice_sched_calc_vsi_support_nodes(pi, tc_node, num_nodes);

	/* add VSI supported nodes to TC subtree */
	return ice_sched_add_vsi_support_nodes(pi, vsi_handle, tc_node,
					       num_nodes);
}
/**
 * ice_sched_add_vsi_to_topo - add a new VSI into tree
 * @pi: port information structure
 * @vsi_handle: software VSI handle
 * @tc: TC number
 *
 * This function adds a new VSI into scheduler tree
 */
add a new VSI into tree
@pi: port information structure
@vsi_handle: software VSI handle
@tc: TC number

This function adds a new VSI into scheduler tree
add a new VSI into tree @pi : port information structure @vsi_handle : software VSI handle @tc : TC number This function adds a new VSI into scheduler tree
static enum ice_status
ice_sched_add_vsi_to_topo(struct ice_port_info *pi, u16 vsi_handle, u8 tc)
{
	u16 num_nodes[ICE_AQC_TOPO_MAX_LEVEL_NUM] = { 0 };
	struct ice_sched_node *tc_node;
	tc_node = ice_sched_get_tc_node(pi, tc);
	if (!tc_node)
		return ICE_ERR_PARAM;
	ice_sched_calc_vsi_support_nodes(pi, tc_node, num_nodes);
	return ice_sched_add_vsi_support_nodes(pi, vsi_handle, tc_node,
					       num_nodes);
}
static enum ice_status ice_sched_add_vsi_to_topo ( struct ice_port_info * pi , u16 vsi_handle , u8 tc ) { u16 num_nodes [ ICE_AQC_TOPO_MAX_LEVEL_NUM ] = { 0 } ; struct ice_sched_node * tc_node ; tc_node = ice_sched_get_tc_node ( pi , tc ) ; if ( ! tc_node ) return ICE_ERR_PARAM ; ice_sched_calc_vsi_support_nodes ( pi , tc_node , num_nodes ) ; return ice_sched_add_vsi_support_nodes ( pi , vsi_handle , tc_node , num_nodes ) ; }
ice_sched_add_vsi_to_topo - add a new VSI into tree
 @pi: port information structure
 @vsi_handle: software VSI handle
 @tc: TC number
ice_sched_add_vsi_to_topo - add a new VSI into tree @pi : port information structure @vsi_handle : software VSI handle @tc : TC number
/* calculate number of supported nodes needed for this VSI */ /* add VSI supported nodes to TC subtree */