ixgb: recalculate after how many descriptors to wake the queue

Recalculate when to wake the queue using DESC_NEEDED instead of a
static hardcoded number.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
This commit is contained in:
Auke Kok 2006-08-31 14:27:51 -07:00 committed by Auke Kok
parent a91bb6a8b4
commit ab8ced2fb0
2 changed files with 1 additions and 4 deletions

View file

@ -1787,7 +1787,7 @@ ixgb_clean_tx_irq(struct ixgb_adapter *adapter)
if (unlikely(netif_queue_stopped(netdev))) {
spin_lock(&adapter->tx_lock);
if (netif_queue_stopped(netdev) && netif_carrier_ok(netdev) &&
(IXGB_DESC_UNUSED(tx_ring) > IXGB_TX_QUEUE_WAKE))
(IXGB_DESC_UNUSED(tx_ring) >= DESC_NEEDED))
netif_wake_queue(netdev);
spin_unlock(&adapter->tx_lock);
}