diff options
author | David S. Miller <davem@davemloft.net> | 2008-01-08 00:06:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-09 02:30:14 -0500 |
commit | 53e52c729cc169db82a6105fac7a166e10c2ec36 (patch) | |
tree | 0cc27895f3a5ce7c73c1ed3d12beed3fa9ff5907 /drivers/net/e100.c | |
parent | fed17f3094b960d3a54b10f17abbe4b57e976eec (diff) |
[NET]: Make ->poll() breakout consistent in Intel ethernet drivers.
This makes the ->poll() routines of the E100, E1000, E1000E, IXGB, and
IXGBE drivers complete ->poll() consistently.
Now they will all break out when the amount of RX work done is less
than 'budget'.
At a later time, we may want put back code to include the TX work as
well (as at least one other NAPI driver does, but by in large NAPI
drivers do not do this). But if so, it should be done consistently
across the board to all of these drivers.
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
Diffstat (limited to 'drivers/net/e100.c')
-rw-r--r-- | drivers/net/e100.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 68316f15a7c..b87402bc830 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -1991,13 +1991,12 @@ static int e100_poll(struct napi_struct *napi, int budget) | |||
1991 | struct nic *nic = container_of(napi, struct nic, napi); | 1991 | struct nic *nic = container_of(napi, struct nic, napi); |
1992 | struct net_device *netdev = nic->netdev; | 1992 | struct net_device *netdev = nic->netdev; |
1993 | unsigned int work_done = 0; | 1993 | unsigned int work_done = 0; |
1994 | int tx_cleaned; | ||
1995 | 1994 | ||
1996 | e100_rx_clean(nic, &work_done, budget); | 1995 | e100_rx_clean(nic, &work_done, budget); |
1997 | tx_cleaned = e100_tx_clean(nic); | 1996 | e100_tx_clean(nic); |
1998 | 1997 | ||
1999 | /* If no Rx and Tx cleanup work was done, exit polling mode. */ | 1998 | /* If budget not fully consumed, exit the polling mode */ |
2000 | if((!tx_cleaned && (work_done == 0))) { | 1999 | if (work_done < budget) { |
2001 | netif_rx_complete(netdev, napi); | 2000 | netif_rx_complete(netdev, napi); |
2002 | e100_enable_irq(nic); | 2001 | e100_enable_irq(nic); |
2003 | } | 2002 | } |