diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2010-05-04 22:26:03 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-05 21:15:32 -0700 |
commit | eab2abf5826b78b126826cc70e564c44816396da (patch) | |
tree | f771389b55090767e8aecdc36f3e80019b3b60bf /drivers/net/e1000/e1000_ethtool.c | |
parent | edf15c17420fed108046da50b3d3ae53dfa0e0ae (diff) |
e1000/e1000e: implement a simple interrupt moderation
Back before e1000-7.3.20, the e1000 driver had a simple algorithm that
managed interrupt moderation. The driver was updated in 7.3.20 to
have the new "adaptive" interrupt moderation but we have customer
requests to redeploy the old way as an option. This patch adds the
old functionality back. The new functionality can be enabled via
module parameter or at runtime via ethtool.
Module parameter: (InterruptThrottleRate=4) to use this new
moderation method.
Ethtool method: ethtool -C ethX rx-usecs 4
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000/e1000_ethtool.c')
-rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index d6931cabe42..2a3b2dccd06 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c @@ -1808,7 +1808,7 @@ static int e1000_get_coalesce(struct net_device *netdev, if (adapter->hw.mac_type < e1000_82545) return -EOPNOTSUPP; - if (adapter->itr_setting <= 3) + if (adapter->itr_setting <= 4) ec->rx_coalesce_usecs = adapter->itr_setting; else ec->rx_coalesce_usecs = 1000000 / adapter->itr_setting; @@ -1826,12 +1826,14 @@ static int e1000_set_coalesce(struct net_device *netdev, return -EOPNOTSUPP; if ((ec->rx_coalesce_usecs > E1000_MAX_ITR_USECS) || - ((ec->rx_coalesce_usecs > 3) && + ((ec->rx_coalesce_usecs > 4) && (ec->rx_coalesce_usecs < E1000_MIN_ITR_USECS)) || (ec->rx_coalesce_usecs == 2)) return -EINVAL; - if (ec->rx_coalesce_usecs <= 3) { + if (ec->rx_coalesce_usecs == 4) { + adapter->itr = adapter->itr_setting = 4; + } else if (ec->rx_coalesce_usecs <= 3) { adapter->itr = 20000; adapter->itr_setting = ec->rx_coalesce_usecs; } else { |