[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1241600198.5172.36.camel@localhost.localdomain>
Date: Wed, 06 May 2009 10:56:38 +0200
From: Jesper Dangaard Brouer <jdb@...x.dk>
To: "Ronciak, John" <john.ronciak@...el.com>,
"David S. Miller" <davem@...emloft.net>
Cc: Jesper Dangaard Brouer <hawk@...u.dk>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
netdev <netdev@...r.kernel.org>,
"e1000-devel@...ts.sourceforge.net"
<e1000-devel@...ts.sourceforge.net>,
"Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
"Allan, Bruce W" <bruce.w.allan@...el.com>,
"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>
Subject: [PATCH v2] igb: Record host memory receive overflow in net_stats
The RNBC (Receive No Buffers Count) register for the 82576, indicate
that frames were received when there were no available buffers in host
memory to store those frames (receive descriptor head and tail
pointers were equal). The packet is still received by the NIC if
there is space in the FIFO
I have shown that this situation can arise when the kernel is too
busy else where.
As the the RNBC value is not necessary a packet drop, I choose to
store the RNBC value in net_stats.rx_fifo_errors.
Saving the stats in dev->net_stats makes it visible via
/proc/net/dev as "fifo", and thus viewable to ifconfig
as "overruns" and 'netstat -i' as "RX-OVR".
The Receive No Buffers Count (RNBC) can already be queried by
ethtool -S as "rx_no_buffer_count".
Signed-off-by: Jesper Dangaard Brouer <hawk@...x.dk>
---
drivers/net/igb/igb_main.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 183235d..3ee00a5 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -3597,6 +3597,10 @@ void igb_update_stats(struct igb_adapter *adapter)
adapter->net_stats.rx_frame_errors = adapter->stats.algnerrc;
adapter->net_stats.rx_missed_errors = adapter->stats.mpc;
+ /* Note RNBC (Receive No Buffers Count) is an overflow
+ * indication, thus not necessary a dropped packet. */
+ adapter->net_stats.rx_fifo_errors = adapter->stats.rnbc;
+
/* Tx Errors */
adapter->net_stats.tx_errors = adapter->stats.ecol +
adapter->stats.latecol;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists