e1000: add queue restart counter

Add a netif_wake/start_queue counter to the ethtool statistics to indicated
to the user that their transmit ring could be too small for their workload.

Signed-off-by: Jesse brandeburg <jesse.brandeburg@intel.com>
Cc: Jamal Hadi <hadi@cyberus.ca>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
This commit is contained in:
Jesse Brandeburg
2006-11-01 08:47:59 -08:00
committed by Jeff Garzik
parent fc2307d00c
commit fcfb122425
3 changed files with 6 additions and 1 deletions

View File

@@ -2974,6 +2974,7 @@ static int __e1000_maybe_stop_tx(struct net_device *netdev, int size)
/* A reprieve! */
netif_start_queue(netdev);
++adapter->restart_queue;
return 0;
}
@@ -3654,8 +3655,10 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter,
* sees the new next_to_clean.
*/
smp_mb();
if (netif_queue_stopped(netdev))
if (netif_queue_stopped(netdev)) {
netif_wake_queue(netdev);
++adapter->restart_queue;
}
}
if (adapter->detect_tx_hung) {