src/dpdk/drivers/net/ice/base/ice_sched.c
enum ice_status ice_cfg_rl_burst_size(struct ice_hw *hw, u32 bytes)
{
	u16 burst_size_to_prog;

	if (bytes < ICE_MIN_BURST_SIZE_ALLOWED ||
	    bytes > ICE_MAX_BURST_SIZE_ALLOWED)
		return ICE_ERR_PARAM;
	if (ice_round_to_num(bytes, 64) <=
	    ICE_MAX_BURST_SIZE_64_BYTE_GRANULARITY) {
		/* 64 byte granularity case */
		/* Disable MSB granularity bit */
		burst_size_to_prog = ICE_64_BYTE_GRANULARITY;
		/* round number to nearest 64 byte granularity */
		bytes = ice_round_to_num(bytes, 64);
		/* The value is in 64 byte chunks */
		burst_size_to_prog |= (u16)(bytes / 64);
	} else {
		/* k bytes granularity case */
		/* Enable MSB granularity bit */
		burst_size_to_prog = ICE_KBYTE_GRANULARITY;
		/* round number to nearest 1024 granularity */
		bytes = ice_round_to_num(bytes, 1024);
		/* check rounding doesn't go beyond allowed */
		if (bytes > ICE_MAX_BURST_SIZE_KBYTE_GRANULARITY)
			bytes = ICE_MAX_BURST_SIZE_KBYTE_GRANULARITY;
		/* The value is in k bytes */
		burst_size_to_prog |= (u16)(bytes / 1024);
	}
	hw->max_burst_size = burst_size_to_prog;
	return ICE_SUCCESS;
}
/**
 * ice_cfg_rl_burst_size - Set burst size value
 * @hw: pointer to the HW struct
 * @bytes: burst size in bytes
 *
 * This function configures/set the burst size to requested new value. The new
 * burst size value is used for future rate limit calls. It doesn't change the
 * existing or previously created RL profiles.
 */
Set burst size value
@hw: pointer to the HW struct
@bytes: burst size in bytes

This function configures/set the burst size to requested new value. The new
burst size value is used for future rate limit calls. It doesn't change the
existing or previously created RL profiles.
Set burst size value @hw : pointer to the HW struct @bytes : burst size in bytes This function configures / set the burst size to requested new value . The new burst size value is used for future rate limit calls . It doesn ' t change the existing or previously created RL profiles .
enum ice_status ice_cfg_rl_burst_size(struct ice_hw *hw, u32 bytes)
{
	u16 burst_size_to_prog;
	if (bytes < ICE_MIN_BURST_SIZE_ALLOWED ||
	    bytes > ICE_MAX_BURST_SIZE_ALLOWED)
		return ICE_ERR_PARAM;
	if (ice_round_to_num(bytes, 64) <=
	    ICE_MAX_BURST_SIZE_64_BYTE_GRANULARITY) {
		burst_size_to_prog = ICE_64_BYTE_GRANULARITY;
		bytes = ice_round_to_num(bytes, 64);
		burst_size_to_prog |= (u16)(bytes / 64);
	} else {
		burst_size_to_prog = ICE_KBYTE_GRANULARITY;
		bytes = ice_round_to_num(bytes, 1024);
		if (bytes > ICE_MAX_BURST_SIZE_KBYTE_GRANULARITY)
			bytes = ICE_MAX_BURST_SIZE_KBYTE_GRANULARITY;
		burst_size_to_prog |= (u16)(bytes / 1024);
	}
	hw->max_burst_size = burst_size_to_prog;
	return ICE_SUCCESS;
}
enum ice_status ice_cfg_rl_burst_size ( struct ice_hw * hw , u32 bytes ) { u16 burst_size_to_prog ; if ( bytes < ICE_MIN_BURST_SIZE_ALLOWED || bytes > ICE_MAX_BURST_SIZE_ALLOWED ) return ICE_ERR_PARAM ; if ( ice_round_to_num ( bytes , 64 ) <= ICE_MAX_BURST_SIZE_64_BYTE_GRANULARITY ) { burst_size_to_prog = ICE_64_BYTE_GRANULARITY ; bytes = ice_round_to_num ( bytes , 64 ) ; burst_size_to_prog |= ( u16 ) ( bytes / 64 ) ; } else { burst_size_to_prog = ICE_KBYTE_GRANULARITY ; bytes = ice_round_to_num ( bytes , 1024 ) ; if ( bytes > ICE_MAX_BURST_SIZE_KBYTE_GRANULARITY ) bytes = ICE_MAX_BURST_SIZE_KBYTE_GRANULARITY ; burst_size_to_prog |= ( u16 ) ( bytes / 1024 ) ; } hw -> max_burst_size = burst_size_to_prog ; return ICE_SUCCESS ; }
ice_cfg_rl_burst_size - Set burst size value
 @hw: pointer to the HW struct
 @bytes: burst size in bytes
ice_cfg_rl_burst_size - Set burst size value @hw : pointer to the HW struct @bytes : burst size in bytes
/* 64 byte granularity case */ /* Disable MSB granularity bit */ /* round number to nearest 64 byte granularity */ /* The value is in 64 byte chunks */ /* k bytes granularity case */ /* Enable MSB granularity bit */ /* round number to nearest 1024 granularity */ /* check rounding doesn't go beyond allowed */ /* The value is in k bytes */