mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 15:02:40 -04:00
[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>
This commit is contained in:
@@ -1787,14 +1787,13 @@ ixgb_clean(struct napi_struct *napi, int budget)
|
||||
{
|
||||
struct ixgb_adapter *adapter = container_of(napi, struct ixgb_adapter, napi);
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
int tx_cleaned;
|
||||
int work_done = 0;
|
||||
|
||||
tx_cleaned = ixgb_clean_tx_irq(adapter);
|
||||
ixgb_clean_tx_irq(adapter);
|
||||
ixgb_clean_rx_irq(adapter, &work_done, budget);
|
||||
|
||||
/* if no Tx and not enough Rx work done, exit the polling mode */
|
||||
if((!tx_cleaned && (work_done == 0))) {
|
||||
/* If budget not fully consumed, exit the polling mode */
|
||||
if (work_done < budget) {
|
||||
netif_rx_complete(netdev, napi);
|
||||
ixgb_irq_enable(adapter);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user