src/dpdk/drivers/net/ice/base/ice_sched.c
enum ice_status
ice_sched_set_agg_bw_shared_lmt(struct ice_port_info *pi, u32 agg_id,
				u32 min_bw, u32 max_bw, u32 shared_bw)
{
	enum ice_status status;
	u8 tc;

	if (!pi)
		return ICE_ERR_PARAM;

	ice_acquire_lock(&pi->sched_lock);
	status = ice_sched_validate_agg_id(pi, agg_id);
	if (status)
		goto exit_agg_bw_shared_lmt;

	/* Return success if no nodes are present across TC */
	ice_for_each_traffic_class(tc) {
		struct ice_sched_node *tc_node, *agg_node;

		tc_node = ice_sched_get_tc_node(pi, tc);
		if (!tc_node)
			continue;

		agg_node = ice_sched_get_agg_node(pi, tc_node, agg_id);
		if (!agg_node)
			continue;

		status = ice_sched_set_agg_node_srl_per_tc(pi, agg_id, tc,
							   min_bw, max_bw,
							   shared_bw);
		if (status)
			break;
	}

exit_agg_bw_shared_lmt:
	ice_release_lock(&pi->sched_lock);
	return status;
}
/**
 * ice_sched_set_agg_bw_shared_lmt - set aggregator BW shared limit
 * @pi: port information structure
 * @agg_id: aggregator ID
 * @min_bw: minimum bandwidth in Kbps
 * @max_bw: maximum bandwidth in Kbps
 * @shared_bw: shared bandwidth in Kbps
 *
 * This function configures the shared rate limiter(SRL) of all aggregator type
 * nodes across all traffic classes for aggregator matching agg_id. When
 * BW value of ICE_SCHED_DFLT_BW is passed, it removes SRL from the
 * node(s).
 */


This function configures the shared rate limiter(SRL) of all aggregator type
nodes across all traffic classes for aggregator matching agg_id. When
BW value of ICE_SCHED_DFLT_BW is passed, it removes SRL from the
node(s).
This function configures the shared rate limiter ( SRL ) of all aggregator type nodes across all traffic classes for aggregator matching agg_id . When BW value of ICE_SCHED_DFLT_BW is passed it removes SRL from the node ( s ) .
enum ice_status
ice_sched_set_agg_bw_shared_lmt(struct ice_port_info *pi, u32 agg_id,
				u32 min_bw, u32 max_bw, u32 shared_bw)
{
	enum ice_status status;
	u8 tc;
	if (!pi)
		return ICE_ERR_PARAM;
	ice_acquire_lock(&pi->sched_lock);
	status = ice_sched_validate_agg_id(pi, agg_id);
	if (status)
		goto exit_agg_bw_shared_lmt;
	ice_for_each_traffic_class(tc) {
		struct ice_sched_node *tc_node, *agg_node;
		tc_node = ice_sched_get_tc_node(pi, tc);
		if (!tc_node)
			continue;
		agg_node = ice_sched_get_agg_node(pi, tc_node, agg_id);
		if (!agg_node)
			continue;
		status = ice_sched_set_agg_node_srl_per_tc(pi, agg_id, tc,
							   min_bw, max_bw,
							   shared_bw);
		if (status)
			break;
	}
exit_agg_bw_shared_lmt:
	ice_release_lock(&pi->sched_lock);
	return status;
}
enum ice_status ice_sched_set_agg_bw_shared_lmt ( struct ice_port_info * pi , u32 agg_id , u32 min_bw , u32 max_bw , u32 shared_bw ) { enum ice_status status ; u8 tc ; if ( ! pi ) return ICE_ERR_PARAM ; ice_acquire_lock ( & pi -> sched_lock ) ; status = ice_sched_validate_agg_id ( pi , agg_id ) ; if ( status ) goto exit_agg_bw_shared_lmt ; ice_for_each_traffic_class ( tc ) { struct ice_sched_node * tc_node , * agg_node ; tc_node = ice_sched_get_tc_node ( pi , tc ) ; if ( ! tc_node ) continue ; agg_node = ice_sched_get_agg_node ( pi , tc_node , agg_id ) ; if ( ! agg_node ) continue ; status = ice_sched_set_agg_node_srl_per_tc ( pi , agg_id , tc , min_bw , max_bw , shared_bw ) ; if ( status ) break ; } exit_agg_bw_shared_lmt : ice_release_lock ( & pi -> sched_lock ) ; return status ; }
ice_sched_set_agg_bw_shared_lmt - set aggregator BW shared limit
 @pi: port information structure
 @agg_id: aggregator ID
 @min_bw: minimum bandwidth in Kbps
 @max_bw: maximum bandwidth in Kbps
 @shared_bw: shared bandwidth in Kbps
ice_sched_set_agg_bw_shared_lmt - set aggregator BW shared limit @pi : port information structure @agg_id : aggregator ID @min_bw : minimum bandwidth in Kbps @max_bw : maximum bandwidth in Kbps @shared_bw : shared bandwidth in Kbps
/* Return success if no nodes are present across TC */