[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:
parent
fed17f3094
commit
53e52c729c
5 changed files with 19 additions and 21 deletions
|
@ -1468,15 +1468,15 @@ static int ixgbe_clean(struct napi_struct *napi, int budget)
|
|||
struct ixgbe_adapter *adapter = container_of(napi,
|
||||
struct ixgbe_adapter, napi);
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
int tx_cleaned = 0, work_done = 0;
|
||||
int work_done = 0;
|
||||
|
||||
/* In non-MSIX case, there is no multi-Tx/Rx queue */
|
||||
tx_cleaned = ixgbe_clean_tx_irq(adapter, adapter->tx_ring);
|
||||
ixgbe_clean_tx_irq(adapter, adapter->tx_ring);
|
||||
ixgbe_clean_rx_irq(adapter, &adapter->rx_ring[0], &work_done,
|
||||
budget);
|
||||
|
||||
/* If no Tx and not enough Rx work done, exit the polling mode */
|
||||
if ((!tx_cleaned && (work_done < budget))) {
|
||||
/* If budget not fully consumed, exit the polling mode */
|
||||
if (work_done < budget) {
|
||||
netif_rx_complete(netdev, napi);
|
||||
ixgbe_irq_enable(adapter);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue