diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2011-10-18 05:50:56 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-19 11:42:27 +0400 |
commit | ad04378cecca9c33b5ea3e46aa4ed71b15e0be0c (patch) | |
tree | 945cdc173d4fa124cb7d88d7d646b62cbdd5e409 /drivers/net/ethernet/mellanox/mlx4/en_port.c | |
parent | f3a9d1f25dfeadf22c775880633a587cc6778872 (diff) | |
download | linux-ad04378cecca9c33b5ea3e46aa4ed71b15e0be0c.tar.xz |
mlx4_en: Checksum counters per ring
Not updating common counters from data path.
The checksum counters are per ring, summarizing them when collecting statistics.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_port.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_port.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_port.c b/drivers/net/ethernet/mellanox/mlx4/en_port.c index 9d275558094a..03c84cd78cde 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_port.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_port.c @@ -214,15 +214,21 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset) stats->rx_packets = 0; stats->rx_bytes = 0; + priv->port_stats.rx_chksum_good = 0; + priv->port_stats.rx_chksum_none = 0; for (i = 0; i < priv->rx_ring_num; i++) { stats->rx_packets += priv->rx_ring[i].packets; stats->rx_bytes += priv->rx_ring[i].bytes; + priv->port_stats.rx_chksum_good += priv->rx_ring[i].csum_ok; + priv->port_stats.rx_chksum_none += priv->rx_ring[i].csum_none; } stats->tx_packets = 0; stats->tx_bytes = 0; + priv->port_stats.tx_chksum_offload = 0; for (i = 0; i < priv->tx_ring_num; i++) { stats->tx_packets += priv->tx_ring[i].packets; stats->tx_bytes += priv->tx_ring[i].bytes; + priv->port_stats.tx_chksum_offload += priv->tx_ring[i].tx_csum; } stats->rx_errors = be64_to_cpu(mlx4_en_stats->PCS) + |