Message ID | 2DFD360E328B3941911E6D28B085D990107C9DA893@SJEXCHCCR01.corp.ad.broadcom.com |
---|---|
State | Not Applicable, archived |
Delegated to: | David Miller |
Headers | show |
On Tue, 2010-06-08 at 02:20 -0700, Dmitry Kravkov wrote: > Hi, > > Different drivers include different errors in stats->rx_errors: Your table didn't line up when display here. It appears you used 6-space tabs so I've expanded them to spaces on that assumption: > bxn2 bnx2x ixgbx sfc dnet atlx > ---------------------------------------------------------------------- > rx_length rx_length rx_length rx_length rx_length rx_length > rx_over rx_over rx_over > rx_frame rx_frame rx_frame rx_frame rx_frame > rx_crc rx_crc rx_crc rx_crc rx_crc > rx_fifo rx_fifo > rx_missed rx_missed > rx_symbol > unsup_opcd > ---------------------------------------------------------------------- > Is there any documentation which defines what should this statistic include? My references are the comments on the structure (in <linux/if_link.h> and <linux/netdevice.h>) and an email by Donald Becker <http://www.uwsg.iu.edu/hypermail/linux/net/0003.3/0154.html>. The comments could probably be expanded. Note also that some of the statistics are combined as follows in /proc/net/dev, which is what ifconfig uses: Heading/subheading Summed statistics ----------------------------------------------------------------------------------------------- Receive/drop rx_dropped, rx_missed_errors Receive/frame rx_length_errors, rx_over_errors, rx_crc_errors, rx_frame_errors Transmit/carrier tx_carrier_errors, tx_aborted_errors, tx_window_errors, tx_heartbeat_errors Something that doesn't make sense to me is that rx_over_errors is included under 'frame' rather than under 'drop'. Ben.
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index aae3347..26b0cc2 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c @@ -1518,11 +1518,8 @@ static struct net_device_stats *efx_net_stats(struct net_device *net_dev) stats->tx_window_errors = mac_stats->tx_late_collision; stats->rx_errors = (stats->rx_length_errors + - stats->rx_over_errors + stats->rx_crc_errors + stats->rx_frame_errors + - stats->rx_fifo_errors + - stats->rx_missed_errors + mac_stats->rx_symbol_error); stats->tx_errors = (stats->tx_window_errors + mac_stats->tx_bad);