src/dpdk/drivers/net/ice/base/ice_sched.c
static enum ice_status
ice_sched_save_vsi_bw(struct ice_port_info *pi, u16 vsi_handle, u8 tc,
		      enum ice_rl_type rl_type, u32 bw)
{
	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(&vsi_ctx->sched.bw_t_info[tc], bw);
		break;
	case ICE_MAX_BW:
		ice_set_clear_eir_bw(&vsi_ctx->sched.bw_t_info[tc], bw);
		break;
	case ICE_SHARED_BW:
		ice_set_clear_shared_bw(&vsi_ctx->sched.bw_t_info[tc], bw);
		break;
	default:
		return ICE_ERR_PARAM;
	}
	return ICE_SUCCESS;
}
/**
 * ice_sched_save_vsi_bw - save VSI node's BW information
 * @pi: port information structure
 * @vsi_handle: sw VSI handle
 * @tc: traffic class
 * @rl_type: rate limit type min, max, or shared
 * @bw: bandwidth in Kbps - Kilo bits per sec
 *
 * Save BW information of VSI type node for post replay use.
 */


Save BW information of VSI type node for post replay use.
Save BW information of VSI type node for post replay use .
static enum ice_status
ice_sched_save_vsi_bw(struct ice_port_info *pi, u16 vsi_handle, u8 tc,
		      enum ice_rl_type rl_type, u32 bw)
{
	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(&vsi_ctx->sched.bw_t_info[tc], bw);
		break;
	case ICE_MAX_BW:
		ice_set_clear_eir_bw(&vsi_ctx->sched.bw_t_info[tc], bw);
		break;
	case ICE_SHARED_BW:
		ice_set_clear_shared_bw(&vsi_ctx->sched.bw_t_info[tc], bw);
		break;
	default:
		return ICE_ERR_PARAM;
	}
	return ICE_SUCCESS;
}
static enum ice_status ice_sched_save_vsi_bw ( struct ice_port_info * pi , u16 vsi_handle , u8 tc , enum ice_rl_type rl_type , u32 bw ) { 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 ( & vsi_ctx -> sched . bw_t_info [ tc ] , bw ) ; break ; case ICE_MAX_BW : ice_set_clear_eir_bw ( & vsi_ctx -> sched . bw_t_info [ tc ] , bw ) ; break ; case ICE_SHARED_BW : ice_set_clear_shared_bw ( & vsi_ctx -> sched . bw_t_info [ tc ] , bw ) ; break ; default : return ICE_ERR_PARAM ; } return ICE_SUCCESS ; }
ice_sched_save_vsi_bw - save VSI node's BW information
 @pi: port information structure
 @vsi_handle: sw VSI handle
 @tc: traffic class
 @rl_type: rate limit type min, max, or shared
 @bw: bandwidth in Kbps - Kilo bits per sec
ice_sched_save_vsi_bw - save VSI node ' s BW information @pi : port information structure @vsi_handle : sw VSI handle @tc : traffic class @rl_type : rate limit type min max or shared @bw : bandwidth in Kbps - Kilo bits per sec