src/dpdk/drivers/net/igc/base/igc_mac.c
void igc_update_adaptive_generic(struct igc_hw *hw)
{
	struct igc_mac_info *mac = &hw->mac;

	DEBUGFUNC("igc_update_adaptive_generic");

	if (!mac->adaptive_ifs) {
		DEBUGOUT("Not in Adaptive IFS mode!\n");
		return;
	}

	if ((mac->collision_delta * mac->ifs_ratio) > mac->tx_packet_delta) {
		if (mac->tx_packet_delta > MIN_NUM_XMITS) {
			mac->in_ifs_mode = true;
			if (mac->current_ifs_val < mac->ifs_max_val) {
				if (!mac->current_ifs_val)
					mac->current_ifs_val = mac->ifs_min_val;
				else
					mac->current_ifs_val +=
						mac->ifs_step_size;
				IGC_WRITE_REG(hw, IGC_AIT,
						mac->current_ifs_val);
			}
		}
	} else {
		if (mac->in_ifs_mode &&
		    mac->tx_packet_delta <= MIN_NUM_XMITS) {
			mac->current_ifs_val = 0;
			mac->in_ifs_mode = false;
			IGC_WRITE_REG(hw, IGC_AIT, 0);
		}
	}
}
/**
 *  igc_update_adaptive_generic - Update Adaptive Interframe Spacing
 *  @hw: pointer to the HW structure
 *
 *  Update the Adaptive Interframe Spacing Throttle value based on the
 *  time between transmitted packets and time between collisions.
 **/
Update Adaptive Interframe Spacing
@hw: pointer to the HW structure

Update the Adaptive Interframe Spacing Throttle value based on the
time between transmitted packets and time between collisions.
Update Adaptive Interframe Spacing @hw : pointer to the HW structure Update the Adaptive Interframe Spacing Throttle value based on the time between transmitted packets and time between collisions .
void igc_update_adaptive_generic(struct igc_hw *hw)
{
	struct igc_mac_info *mac = &hw->mac;
	DEBUGFUNC("igc_update_adaptive_generic");
	if (!mac->adaptive_ifs) {
		DEBUGOUT("Not in Adaptive IFS mode!\n");
		return;
	}
	if ((mac->collision_delta * mac->ifs_ratio) > mac->tx_packet_delta) {
		if (mac->tx_packet_delta > MIN_NUM_XMITS) {
			mac->in_ifs_mode = true;
			if (mac->current_ifs_val < mac->ifs_max_val) {
				if (!mac->current_ifs_val)
					mac->current_ifs_val = mac->ifs_min_val;
				else
					mac->current_ifs_val +=
						mac->ifs_step_size;
				IGC_WRITE_REG(hw, IGC_AIT,
						mac->current_ifs_val);
			}
		}
	} else {
		if (mac->in_ifs_mode &&
		    mac->tx_packet_delta <= MIN_NUM_XMITS) {
			mac->current_ifs_val = 0;
			mac->in_ifs_mode = false;
			IGC_WRITE_REG(hw, IGC_AIT, 0);
		}
	}
}
void igc_update_adaptive_generic ( struct igc_hw * hw ) { struct igc_mac_info * mac = & hw -> mac ; DEBUGFUNC ( " " ) ; if ( ! mac -> adaptive_ifs ) { DEBUGOUT ( " \n " ) ; return ; } if ( ( mac -> collision_delta * mac -> ifs_ratio ) > mac -> tx_packet_delta ) { if ( mac -> tx_packet_delta > MIN_NUM_XMITS ) { mac -> in_ifs_mode = true ; if ( mac -> current_ifs_val < mac -> ifs_max_val ) { if ( ! mac -> current_ifs_val ) mac -> current_ifs_val = mac -> ifs_min_val ; else mac -> current_ifs_val += mac -> ifs_step_size ; IGC_WRITE_REG ( hw , IGC_AIT , mac -> current_ifs_val ) ; } } } else { if ( mac -> in_ifs_mode && mac -> tx_packet_delta <= MIN_NUM_XMITS ) { mac -> current_ifs_val = 0 ; mac -> in_ifs_mode = false ; IGC_WRITE_REG ( hw , IGC_AIT , 0 ) ; } } }
igc_update_adaptive_generic - Update Adaptive Interframe Spacing
  @hw: pointer to the HW structure
igc_update_adaptive_generic - Update Adaptive Interframe Spacing @hw : pointer to the HW structure