src/dpdk/drivers/net/ice/base/ice_sched.c
static enum ice_status
ice_sched_save_agg_bw_alloc(struct ice_port_info *pi, u32 agg_id, u8 tc,
			    enum ice_rl_type rl_type, u16 bw_alloc)
{
	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_alloc(&agg_info->bw_t_info[tc], bw_alloc);
		break;
	case ICE_MAX_BW:
		ice_set_clear_eir_bw_alloc(&agg_info->bw_t_info[tc], bw_alloc);
		break;
	default:
		return ICE_ERR_PARAM;
	}
	return ICE_SUCCESS;
}
/**
 * ice_sched_save_agg_bw_alloc - save aggregator node's BW alloc information
 * @pi: port information structure
 * @agg_id: node aggregator ID
 * @tc: traffic class
 * @rl_type: rate limit type min or max
 * @bw_alloc: bandwidth alloc information
 *
 * Save BW alloc information of AGG type node for post replay use.
 */


Save BW alloc information of AGG type node for post replay use.
Save BW alloc information of AGG type node for post replay use .
static enum ice_status
ice_sched_save_agg_bw_alloc(struct ice_port_info *pi, u32 agg_id, u8 tc,
			    enum ice_rl_type rl_type, u16 bw_alloc)
{
	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_alloc(&agg_info->bw_t_info[tc], bw_alloc);
		break;
	case ICE_MAX_BW:
		ice_set_clear_eir_bw_alloc(&agg_info->bw_t_info[tc], bw_alloc);
		break;
	default:
		return ICE_ERR_PARAM;
	}
	return ICE_SUCCESS;
}
static enum ice_status ice_sched_save_agg_bw_alloc ( struct ice_port_info * pi , u32 agg_id , u8 tc , enum ice_rl_type rl_type , u16 bw_alloc ) { 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_alloc ( & agg_info -> bw_t_info [ tc ] , bw_alloc ) ; break ; case ICE_MAX_BW : ice_set_clear_eir_bw_alloc ( & agg_info -> bw_t_info [ tc ] , bw_alloc ) ; break ; default : return ICE_ERR_PARAM ; } return ICE_SUCCESS ; }
ice_sched_save_agg_bw_alloc - save aggregator node's BW alloc information
 @pi: port information structure
 @agg_id: node aggregator ID
 @tc: traffic class
 @rl_type: rate limit type min or max
 @bw_alloc: bandwidth alloc information
ice_sched_save_agg_bw_alloc - save aggregator node ' s BW alloc information @pi : port information structure @agg_id : node aggregator ID @tc : traffic class @rl_type : rate limit type min or max @bw_alloc : bandwidth alloc information