Commit 4f63b877 authored by John W. Linville's avatar John W. Linville Committed by David S. Miller

[TG3]: Do not count non-error frames dropped by the hardware as rx_errors.

Instead, count them as part of rx_missed_errors.
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b88a762b
...@@ -6893,8 +6893,7 @@ static struct net_device_stats *tg3_get_stats(struct net_device *dev) ...@@ -6893,8 +6893,7 @@ static struct net_device_stats *tg3_get_stats(struct net_device *dev)
get_stat64(&hw_stats->tx_octets); get_stat64(&hw_stats->tx_octets);
stats->rx_errors = old_stats->rx_errors + stats->rx_errors = old_stats->rx_errors +
get_stat64(&hw_stats->rx_errors) + get_stat64(&hw_stats->rx_errors);
get_stat64(&hw_stats->rx_discards);
stats->tx_errors = old_stats->tx_errors + stats->tx_errors = old_stats->tx_errors +
get_stat64(&hw_stats->tx_errors) + get_stat64(&hw_stats->tx_errors) +
get_stat64(&hw_stats->tx_mac_errors) + get_stat64(&hw_stats->tx_mac_errors) +
...@@ -6922,6 +6921,9 @@ static struct net_device_stats *tg3_get_stats(struct net_device *dev) ...@@ -6922,6 +6921,9 @@ static struct net_device_stats *tg3_get_stats(struct net_device *dev)
stats->rx_crc_errors = old_stats->rx_crc_errors + stats->rx_crc_errors = old_stats->rx_crc_errors +
calc_crc_errors(tp); calc_crc_errors(tp);
stats->rx_missed_errors = old_stats->rx_missed_errors +
get_stat64(&hw_stats->rx_discards);
return stats; return stats;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment