From: Jesper Dangaard Brouer <jdb@comx.dk>
To: "Ronciak, John" <john.ronciak@intel.com>,
"David S. Miller" <davem@davemloft.net>
Cc: Jesper Dangaard Brouer <hawk@diku.dk>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
netdev <netdev@vger.kernel.org>,
"e1000-devel@lists.sourceforge.net"
<e1000-devel@lists.sourceforge.net>,
"Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
"Allan, Bruce W" <bruce.w.allan@intel.com>,
"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@intel.com>
Subject: [PATCH v2] igb: Record host memory receive overflow in net_stats
Date: Wed, 06 May 2009 10:56:38 +0200 [thread overview]
Message-ID: <1241600198.5172.36.camel@localhost.localdomain> (raw)
In-Reply-To: <1241597562.5172.25.camel@localhost.localdomain>
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@comx.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;
prev parent reply other threads:[~2009-05-06 8:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-04 11:06 [PATCH] igb: Record hardware RX overruns in net_stats Jesper Dangaard Brouer
2009-05-05 18:47 ` Jeff Kirsher
2009-05-05 18:58 ` David Miller
2009-05-05 21:24 ` Jesper Dangaard Brouer
2009-05-05 21:32 ` Jeff Kirsher
2009-05-05 21:35 ` David Miller
2009-05-06 7:46 ` Jesper Dangaard Brouer
2009-05-06 8:11 ` Waskiewicz Jr, Peter P
2009-05-06 13:09 ` Jesper Dangaard Brouer
2009-05-06 20:59 ` Jesper Dangaard Brouer
2009-05-06 21:24 ` Waskiewicz Jr, Peter P
2009-05-05 22:38 ` Ronciak, John
2009-05-06 8:12 ` Jesper Dangaard Brouer
2009-05-06 8:56 ` Jesper Dangaard Brouer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1241600198.5172.36.camel@localhost.localdomain \
--to=jdb@comx.dk \
--cc=bruce.w.allan@intel.com \
--cc=davem@davemloft.net \
--cc=e1000-devel@lists.sourceforge.net \
--cc=hawk@diku.dk \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=john.ronciak@intel.com \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox