From: Auke Kok Date: Thu, 31 Aug 2006 21:27:51 +0000 (-0700) Subject: ixgb: recalculate after how many descriptors to wake the queue X-Git-Tag: v2.6.19-rc1~1263^2~64^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ab8ced2fb00f3a1e1b63f8c3c61ad4262308ddc0;p=karo-tx-linux.git 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 --- diff --git a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h index 82b67af54c94..a4bee8cafa58 100644 --- a/drivers/net/ixgb/ixgb.h +++ b/drivers/net/ixgb/ixgb.h @@ -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 */ diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index fee4c5aac31b..960b44b5b02b 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c @@ -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); }