src/dpdk/drivers/net/ice/base/ice_sched.c
static enum ice_status
ice_sched_save_vsi_bw_alloc(struct ice_port_info *pi, u16 vsi_handle, u8 tc,
			    enum ice_rl_type rl_type, u16 bw_alloc)
{
	struct ice_vsi_ctx *vsi_ctx;

	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;
	switch (rl_type) {
	case ICE_MIN_BW:
		ice_set_clear_cir_bw_alloc(&vsi_ctx->sched.bw_t_info[tc],
					   bw_alloc);
		break;
	case ICE_MAX_BW:
		ice_set_clear_eir_bw_alloc(&vsi_ctx->sched.bw_t_info[tc],
					   bw_alloc);
		break;
	default:
		return ICE_ERR_PARAM;
	}
	return ICE_SUCCESS;
}
/**
 * ice_sched_save_vsi_bw_alloc - save VSI node's BW alloc information
 * @pi: port information structure
 * @vsi_handle: sw VSI handle
 * @tc: traffic class
 * @rl_type: rate limit type min or max
 * @bw_alloc: Bandwidth allocation information
 *
 * Save BW alloc information of VSI type node for post replay use.
 */


Save BW alloc information of VSI type node for post replay use.
Save BW alloc information of VSI type node for post replay use .
static enum ice_status
ice_sched_save_vsi_bw_alloc(struct ice_port_info *pi, u16 vsi_handle, u8 tc,
			    enum ice_rl_type rl_type, u16 bw_alloc)
{
	struct ice_vsi_ctx *vsi_ctx;
	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;
	switch (rl_type) {
	case ICE_MIN_BW:
		ice_set_clear_cir_bw_alloc(&vsi_ctx->sched.bw_t_info[tc],
					   bw_alloc);
		break;
	case ICE_MAX_BW:
		ice_set_clear_eir_bw_alloc(&vsi_ctx->sched.bw_t_info[tc],
					   bw_alloc);
		break;
	default:
		return ICE_ERR_PARAM;
	}
	return ICE_SUCCESS;
}
static enum ice_status ice_sched_save_vsi_bw_alloc ( struct ice_port_info * pi , u16 vsi_handle , u8 tc , enum ice_rl_type rl_type , u16 bw_alloc ) { struct ice_vsi_ctx * vsi_ctx ; 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 ; switch ( rl_type ) { case ICE_MIN_BW : ice_set_clear_cir_bw_alloc ( & vsi_ctx -> sched . bw_t_info [ tc ] , bw_alloc ) ; break ; case ICE_MAX_BW : ice_set_clear_eir_bw_alloc ( & vsi_ctx -> sched . bw_t_info [ tc ] , bw_alloc ) ; break ; default : return ICE_ERR_PARAM ; } return ICE_SUCCESS ; }
ice_sched_save_vsi_bw_alloc - save VSI node's BW alloc information
 @pi: port information structure
 @vsi_handle: sw VSI handle
 @tc: traffic class
 @rl_type: rate limit type min or max
 @bw_alloc: Bandwidth allocation information
ice_sched_save_vsi_bw_alloc - save VSI node ' s BW alloc information @pi : port information structure @vsi_handle : sw VSI handle @tc : traffic class @rl_type : rate limit type min or max @bw_alloc : Bandwidth allocation information