src/dpdk/drivers/net/ice/base/ice_sched.c
enum ice_status
ice_sched_set_agg_bw_dflt_lmt(struct ice_port_info *pi, u16 vsi_handle)
{
	struct ice_vsi_ctx *vsi_ctx;
	enum ice_status status = ICE_SUCCESS;
	u8 tc;

	if (!ice_is_vsi_valid(pi->hw, vsi_handle))
		return ICE_ERR_PARAM;
	vsi_ctx = ice_get_vsi_ctx(pi->hw, vsi_handle);
	if (!vsi_ctx)
		return ICE_ERR_PARAM;

	ice_for_each_traffic_class(tc) {
		struct ice_sched_node *node;

		node = vsi_ctx->sched.ag_node[tc];
		if (!node)
			continue;

		/* Set min profile to default */
		status = ice_sched_set_node_bw_dflt_lmt(pi, node, ICE_MIN_BW);
		if (status)
			break;

		/* Set max profile to default */
		status = ice_sched_set_node_bw_dflt_lmt(pi, node, ICE_MAX_BW);
		if (status)
			break;

		/* Remove shared profile, if there is one */
		status = ice_sched_set_node_bw_dflt_lmt(pi, node,
							ICE_SHARED_BW);
		if (status)
			break;
	}

	return status;
}
/**
 * ice_sched_set_agg_bw_dflt_lmt - set aggregator node's BW limit to default
 * @pi: port information structure
 * @vsi_handle: software VSI handle
 *
 * This function retrieves the aggregator ID based on VSI ID and TC,
 * and sets node's BW limit to default. This function needs to be
 * called with the scheduler lock held.
 */
set aggregator node's BW limit to default
@pi: port information structure
@vsi_handle: software VSI handle

This function retrieves the aggregator ID based on VSI ID and TC,
and sets node's BW limit to default. This function needs to be
called with the scheduler lock held.
set aggregator node ' s BW limit to default @pi : port information structure @vsi_handle : software VSI handle This function retrieves the aggregator ID based on VSI ID and TC and sets node ' s BW limit to default . This function needs to be called with the scheduler lock held .
enum ice_status
ice_sched_set_agg_bw_dflt_lmt(struct ice_port_info *pi, u16 vsi_handle)
{
	struct ice_vsi_ctx *vsi_ctx;
	enum ice_status status = ICE_SUCCESS;
	u8 tc;
	if (!ice_is_vsi_valid(pi->hw, vsi_handle))
		return ICE_ERR_PARAM;
	vsi_ctx = ice_get_vsi_ctx(pi->hw, vsi_handle);
	if (!vsi_ctx)
		return ICE_ERR_PARAM;
	ice_for_each_traffic_class(tc) {
		struct ice_sched_node *node;
		node = vsi_ctx->sched.ag_node[tc];
		if (!node)
			continue;
		status = ice_sched_set_node_bw_dflt_lmt(pi, node, ICE_MIN_BW);
		if (status)
			break;
		status = ice_sched_set_node_bw_dflt_lmt(pi, node, ICE_MAX_BW);
		if (status)
			break;
		status = ice_sched_set_node_bw_dflt_lmt(pi, node,
							ICE_SHARED_BW);
		if (status)
			break;
	}
	return status;
}
enum ice_status ice_sched_set_agg_bw_dflt_lmt ( struct ice_port_info * pi , u16 vsi_handle ) { struct ice_vsi_ctx * vsi_ctx ; enum ice_status status = ICE_SUCCESS ; u8 tc ; if ( ! ice_is_vsi_valid ( pi -> hw , vsi_handle ) ) return ICE_ERR_PARAM ; vsi_ctx = ice_get_vsi_ctx ( pi -> hw , vsi_handle ) ; if ( ! vsi_ctx ) return ICE_ERR_PARAM ; ice_for_each_traffic_class ( tc ) { struct ice_sched_node * node ; node = vsi_ctx -> sched . ag_node [ tc ] ; if ( ! node ) continue ; status = ice_sched_set_node_bw_dflt_lmt ( pi , node , ICE_MIN_BW ) ; if ( status ) break ; status = ice_sched_set_node_bw_dflt_lmt ( pi , node , ICE_MAX_BW ) ; if ( status ) break ; status = ice_sched_set_node_bw_dflt_lmt ( pi , node , ICE_SHARED_BW ) ; if ( status ) break ; } return status ; }
ice_sched_set_agg_bw_dflt_lmt - set aggregator node's BW limit to default
 @pi: port information structure
 @vsi_handle: software VSI handle
ice_sched_set_agg_bw_dflt_lmt - set aggregator node ' s BW limit to default @pi : port information structure @vsi_handle : software VSI handle
/* Set min profile to default */ /* Set max profile to default */ /* Remove shared profile, if there is one */