diff options
author | Jesper Dangaard Brouer <hawk@comx.dk> | 2009-05-26 17:50:31 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-27 07:35:05 +0400 |
commit | 8c0ab70ab9cc849af59ef6592bd652a938b21c79 (patch) | |
tree | f7be759f12ba98ea679ba8c7b161f17eaba7fdeb /drivers/net/igb/igb.h | |
parent | 3c514ce2f9ae20c06fb17c7ccff40cad1516cc41 (diff) | |
download | linux-8c0ab70ab9cc849af59ef6592bd652a938b21c79.tar.xz |
igb: Implement reading of reg RQDPC (Receive Queue Drop Packet Count)
Based on the previous patches from Jesper Dangaard Brouer <hawk@comx.dk>
Implement reading the per queue drop stats register
RQDPC (Receive Queue Drop Packet Count). It counts the number of
packets dropped by a queue due to lack of descriptors available.
Notice RQDPC (Receive Queue Drop Packet Count) stats only gets
incremented, if the DROP_EN bit it set (in the SRRCTL register
for that queue). If DROP_EN bit is NOT set, then the some what
equivalent count is stored in RNBC (not per queue basis).
The RQDPC register is only 12 bit, thus the precision might
suffer due to overrun in-netween the watchdog polling interval.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb.h')
-rw-r--r-- | drivers/net/igb/igb.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/igb/igb.h b/drivers/net/igb/igb.h index 154c5acc6fce..b2c98dea9eed 100644 --- a/drivers/net/igb/igb.h +++ b/drivers/net/igb/igb.h @@ -137,11 +137,17 @@ struct igb_buffer { }; }; -struct igb_queue_stats { +struct igb_tx_queue_stats { u64 packets; u64 bytes; }; +struct igb_rx_queue_stats { + u64 packets; + u64 bytes; + u64 drops; +}; + struct igb_ring { struct igb_adapter *adapter; /* backlink */ void *desc; /* descriptor ring memory */ @@ -167,12 +173,13 @@ struct igb_ring { union { /* TX */ struct { - struct igb_queue_stats tx_stats; + struct igb_tx_queue_stats tx_stats; bool detect_tx_hung; }; /* RX */ struct { - struct igb_queue_stats rx_stats; + struct igb_rx_queue_stats rx_stats; + u64 rx_queue_drops; struct napi_struct napi; int set_itr; struct igb_ring *buddy; |