FreeBSD/sys/dev/ixl/ixl_pf_main.c
/**
 * Read and update a 32 bit stat from the hw
 **/
Read and update a 32 bit stat from the hw
Read and update a 32 bit stat from the hw
void
ixl_stat_update32(struct i40e_hw *hw, u32 reg,
	bool offset_loaded, u64 *offset, u64 *stat)
{
	u32 new_data;
	new_data = rd32(hw, reg);
	if (!offset_loaded)
		*offset = new_data;
	if (new_data >= *offset)
		*stat = (u32)(new_data - *offset);
	else
		*stat = (u32)((new_data + ((u64)1 << 32)) - *offset);
}
void ixl_stat_update32 ( struct i40e_hw * hw , u32 reg , bool offset_loaded , u64 * offset , u64 * stat ) { u32 new_data ; new_data = rd32 ( hw , reg ) ; if ( ! offset_loaded ) * offset = new_data ; if ( new_data >= * offset ) * stat = ( u32 ) ( new_data - * offset ) ; else * stat = ( u32 ) ( ( new_data + ( ( u64 ) 1 << 32 ) ) - * offset ) ; }
Read and update a 32 bit stat from the hw
Read and update a 32 bit stat from the hw