Commit ab8ced2f authored by Auke Kok's avatar Auke Kok Committed by Auke Kok
Browse files

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: default avatarAuke Kok <auke-jan.h.kok@intel.com>
parent a91bb6a8
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -110,9 +110,6 @@ struct ixgb_adapter;
#define IXGB_RXBUFFER_8192  8192
#define IXGB_RXBUFFER_16384 16384

/* How many Tx Descriptors do we need to call netif_wake_queue? */
#define IXGB_TX_QUEUE_WAKE 16

/* How many Rx Buffers do we bundle into one write to the hardware ? */
#define IXGB_RX_BUFFER_WRITE	4	/* Must be power of 2 */

+1 −1
Original line number Diff line number Diff line
@@ -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);
	}