Commit 1cdc2cfc authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller

sfc: Use MCDI RX_BAD_FCS_PKTS count as MAC rx_bad count

Calculating rx_bad as rx_packets - rx_good is unnecessary and
incorrect, since rx_good does not include control frames (e.g.
pause frames) and rx_packets does.
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e548833d
...@@ -450,7 +450,7 @@ static int siena_try_update_nic_stats(struct efx_nic *efx) ...@@ -450,7 +450,7 @@ static int siena_try_update_nic_stats(struct efx_nic *efx)
mac_stats->rx_bad_bytes); mac_stats->rx_bad_bytes);
MAC_STAT(rx_packets, RX_PKTS); MAC_STAT(rx_packets, RX_PKTS);
MAC_STAT(rx_good, RX_GOOD_PKTS); MAC_STAT(rx_good, RX_GOOD_PKTS);
mac_stats->rx_bad = mac_stats->rx_packets - mac_stats->rx_good; MAC_STAT(rx_bad, RX_BAD_FCS_PKTS);
MAC_STAT(rx_pause, RX_PAUSE_PKTS); MAC_STAT(rx_pause, RX_PAUSE_PKTS);
MAC_STAT(rx_control, RX_CONTROL_PKTS); MAC_STAT(rx_control, RX_CONTROL_PKTS);
MAC_STAT(rx_unicast, RX_UNICAST_PKTS); MAC_STAT(rx_unicast, RX_UNICAST_PKTS);
......
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