diff options
author | Andy Gospodarek <andy@greyhouse.net> | 2009-06-18 07:57:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-19 04:12:51 -0400 |
commit | 679e8a0f0ae3333e94b1d374d07775fce9066025 (patch) | |
tree | d24d7b1f37f8f33599841b51b9aef0c13e57f0e4 /drivers/net | |
parent | 68924920cb457ac44b14ca38343954bdcee046fc (diff) |
e1000e: stop unnecessary polling when using msi-x
The last hunk of this commit:
commit 12d04a3c12b420f23398b4d650127642469a60a6
Author: Alexander Duyck <alexander.h.duyck@intel.com>
Date: Wed Mar 25 22:05:03 2009 +0000
e1000e: commonize tx cleanup routine to match e1000 & igb
changed the logic for determining if we should call napi_complete or
not at then end of a napi poll.
If the NIC is using MSI-X with no work to do in ->poll, net_rx_action
can just spin indefinitely on older kernels and for 2 jiffies on newer
kernels since napi_complete is never called and budget isn't
decremented.
Discovered and verified while testing driver backport to an older
kernel.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 677f60490f67..679885a122b4 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -1997,7 +1997,7 @@ static int e1000_clean(struct napi_struct *napi, int budget) | |||
1997 | struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi); | 1997 | struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi); |
1998 | struct e1000_hw *hw = &adapter->hw; | 1998 | struct e1000_hw *hw = &adapter->hw; |
1999 | struct net_device *poll_dev = adapter->netdev; | 1999 | struct net_device *poll_dev = adapter->netdev; |
2000 | int tx_cleaned = 0, work_done = 0; | 2000 | int tx_cleaned = 1, work_done = 0; |
2001 | 2001 | ||
2002 | adapter = netdev_priv(poll_dev); | 2002 | adapter = netdev_priv(poll_dev); |
2003 | 2003 | ||