src/dpdk/drivers/net/ice/base/ice_sched.c
static enum ice_status
ice_sched_save_agg_bw(struct ice_port_info *pi, u32 agg_id, u8 tc,
		      enum ice_rl_type rl_type, u32 bw)
{
	struct ice_sched_agg_info *agg_info;

	agg_info = ice_get_agg_info(pi->hw, agg_id);
	if (!agg_info)
		return ICE_ERR_PARAM;
	if (!ice_is_tc_ena(agg_info->tc_bitmap[0], tc))
		return ICE_ERR_PARAM;
	switch (rl_type) {
	case ICE_MIN_BW:
		ice_set_clear_cir_bw(&agg_info->bw_t_info[tc], bw);
		break;
	case ICE_MAX_BW:
		ice_set_clear_eir_bw(&agg_info->bw_t_info[tc], bw);
		break;
	case ICE_SHARED_BW:
		ice_set_clear_shared_bw(&agg_info->bw_t_info[tc], bw);
		break;
	default:
		return ICE_ERR_PARAM;
	}
	return ICE_SUCCESS;
}
/**
 * ice_sched_save_agg_bw - save aggregator node's BW information
 * @pi: port information structure
 * @agg_id: node aggregator ID
 * @tc: traffic class
 * @rl_type: rate limit type min, max, or shared
 * @bw: bandwidth in Kbps - Kilo bits per sec
 *
 * Save BW information of AGG type node for post replay use.
 */


Save BW information of AGG type node for post replay use.
Save BW information of AGG type node for post replay use .
static enum ice_status
ice_sched_save_agg_bw(struct ice_port_info *pi, u32 agg_id, u8 tc,
		      enum ice_rl_type rl_type, u32 bw)
{
	struct ice_sched_agg_info *agg_info;
	agg_info = ice_get_agg_info(pi->hw, agg_id);
	if (!agg_info)
		return ICE_ERR_PARAM;
	if (!ice_is_tc_ena(agg_info->tc_bitmap[0], tc))
		return ICE_ERR_PARAM;
	switch (rl_type) {
	case ICE_MIN_BW:
		ice_set_clear_cir_bw(&agg_info->bw_t_info[tc], bw);
		break;
	case ICE_MAX_BW:
		ice_set_clear_eir_bw(&agg_info->bw_t_info[tc], bw);
		break;
	case ICE_SHARED_BW:
		ice_set_clear_shared_bw(&agg_info->bw_t_info[tc], bw);
		break;
	default:
		return ICE_ERR_PARAM;
	}
	return ICE_SUCCESS;
}
static enum ice_status ice_sched_save_agg_bw ( struct ice_port_info * pi , u32 agg_id , u8 tc , enum ice_rl_type rl_type , u32 bw ) { struct ice_sched_agg_info * agg_info ; agg_info = ice_get_agg_info ( pi -> hw , agg_id ) ; if ( ! agg_info ) return ICE_ERR_PARAM ; if ( ! ice_is_tc_ena ( agg_info -> tc_bitmap [ 0 ] , tc ) ) return ICE_ERR_PARAM ; switch ( rl_type ) { case ICE_MIN_BW : ice_set_clear_cir_bw ( & agg_info -> bw_t_info [ tc ] , bw ) ; break ; case ICE_MAX_BW : ice_set_clear_eir_bw ( & agg_info -> bw_t_info [ tc ] , bw ) ; break ; case ICE_SHARED_BW : ice_set_clear_shared_bw ( & agg_info -> bw_t_info [ tc ] , bw ) ; break ; default : return ICE_ERR_PARAM ; } return ICE_SUCCESS ; }
ice_sched_save_agg_bw - save aggregator node's BW information
 @pi: port information structure
 @agg_id: node aggregator ID
 @tc: traffic class
 @rl_type: rate limit type min, max, or shared
 @bw: bandwidth in Kbps - Kilo bits per sec
ice_sched_save_agg_bw - save aggregator node ' s BW information @pi : port information structure @agg_id : node aggregator ID @tc : traffic class @rl_type : rate limit type min max or shared @bw : bandwidth in Kbps - Kilo bits per sec