]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sfc: XMAC statistics fix-ups
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 1 Sep 2008 11:46:10 +0000 (12:46 +0100)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 3 Sep 2008 13:53:43 +0000 (09:53 -0400)
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>
drivers/net/sfc/falcon_xmac.c

index 55c0d9760be8d12cc52ae592e0febf1e16f5e7b1..ab114b4c342648d24279a235e86f72079d18b57c 100644 (file)
@@ -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)