Lines Matching refs:ec
1847 struct ethtool_coalesce *ec) in i40e_get_coalesce() argument
1852 ec->tx_max_coalesced_frames_irq = vsi->work_limit; in i40e_get_coalesce()
1853 ec->rx_max_coalesced_frames_irq = vsi->work_limit; in i40e_get_coalesce()
1856 ec->use_adaptive_rx_coalesce = 1; in i40e_get_coalesce()
1859 ec->use_adaptive_tx_coalesce = 1; in i40e_get_coalesce()
1861 ec->rx_coalesce_usecs = vsi->rx_itr_setting & ~I40E_ITR_DYNAMIC; in i40e_get_coalesce()
1862 ec->tx_coalesce_usecs = vsi->tx_itr_setting & ~I40E_ITR_DYNAMIC; in i40e_get_coalesce()
1869 ec->rx_coalesce_usecs_high = vsi->int_rate_limit; in i40e_get_coalesce()
1870 ec->tx_coalesce_usecs_high = vsi->int_rate_limit; in i40e_get_coalesce()
1876 struct ethtool_coalesce *ec) in i40e_set_coalesce() argument
1886 if (ec->tx_max_coalesced_frames_irq || ec->rx_max_coalesced_frames_irq) in i40e_set_coalesce()
1887 vsi->work_limit = ec->tx_max_coalesced_frames_irq; in i40e_set_coalesce()
1890 if (ec->tx_coalesce_usecs_high != vsi->int_rate_limit) { in i40e_set_coalesce()
1895 if (ec->rx_coalesce_usecs_high >= INTRL_REG_TO_USEC(I40E_MAX_INTRL)) { in i40e_set_coalesce()
1901 if ((ec->rx_coalesce_usecs >= (I40E_MIN_ITR << 1)) && in i40e_set_coalesce()
1902 (ec->rx_coalesce_usecs <= (I40E_MAX_ITR << 1))) { in i40e_set_coalesce()
1903 vsi->rx_itr_setting = ec->rx_coalesce_usecs; in i40e_set_coalesce()
1904 } else if (ec->rx_coalesce_usecs == 0) { in i40e_set_coalesce()
1905 vsi->rx_itr_setting = ec->rx_coalesce_usecs; in i40e_set_coalesce()
1906 if (ec->use_adaptive_rx_coalesce) in i40e_set_coalesce()
1913 vsi->int_rate_limit = ec->rx_coalesce_usecs_high; in i40e_set_coalesce()
1915 if ((ec->tx_coalesce_usecs >= (I40E_MIN_ITR << 1)) && in i40e_set_coalesce()
1916 (ec->tx_coalesce_usecs <= (I40E_MAX_ITR << 1))) { in i40e_set_coalesce()
1917 vsi->tx_itr_setting = ec->tx_coalesce_usecs; in i40e_set_coalesce()
1918 } else if (ec->tx_coalesce_usecs == 0) { in i40e_set_coalesce()
1919 vsi->tx_itr_setting = ec->tx_coalesce_usecs; in i40e_set_coalesce()
1920 if (ec->use_adaptive_tx_coalesce) in i40e_set_coalesce()
1928 if (ec->use_adaptive_rx_coalesce) in i40e_set_coalesce()
1933 if (ec->use_adaptive_tx_coalesce) in i40e_set_coalesce()