Skip to content

Commit

Permalink
sfc: XMAC statistics fix-ups
Browse files Browse the repository at this point in the history
Exclude assumed size of RX control frames from rx_bad_bytes.

Exclude assumed size of TX control frames from tx_good_bytes for
consistency with rx_good_bytes.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Ben Hutchings authored and Jeff Garzik committed Sep 3, 2008
1 parent 5b39fe3 commit c264361
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/sfc/falcon_xmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,11 @@ void falcon_update_stats_xmac(struct efx_nic *efx)

/* Update derived statistics */
mac_stats->tx_good_bytes =
(mac_stats->tx_bytes - mac_stats->tx_bad_bytes);
(mac_stats->tx_bytes - mac_stats->tx_bad_bytes -
mac_stats->tx_control * 64);
mac_stats->rx_bad_bytes =
(mac_stats->rx_bytes - mac_stats->rx_good_bytes);
(mac_stats->rx_bytes - mac_stats->rx_good_bytes -
mac_stats->rx_control * 64);
}

int falcon_check_xmac(struct efx_nic *efx)
Expand Down

0 comments on commit c264361

Please sign in to comment.