diff options
author | Eran Ben Elisha <eranbe@mellanox.com> | 2018-02-27 17:17:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-27 22:53:26 +0300 |
commit | f26d0d2543cb34680393d9993eea4150a153c3fa (patch) | |
tree | 64030feca77f898ff52416be9e2ac11556e8a247 /drivers/net/ethernet/mellanox/mlx4/en_netdev.c | |
parent | 431c7ec3b3bac0136c61dd38814d51519db6eee6 (diff) | |
download | linux-f26d0d2543cb34680393d9993eea4150a153c3fa.tar.xz |
net/mlx4_en: Add physical RX/TX bytes/packets counters
Add physical RX/TX packets/bytes counters into ethtool output to monitor
all traffic that was received and transmitted on the port. These
counters are available only for none Virtual Function.
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_netdev.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index 8fc51bc29003..b62d2c3f976a 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c @@ -3256,6 +3256,10 @@ void mlx4_en_set_stats_bitmap(struct mlx4_dev *dev, bitmap_set(stats_bitmap->bitmap, last_i, NUM_XDP_STATS); last_i += NUM_XDP_STATS; + + if (!mlx4_is_slave(dev)) + bitmap_set(stats_bitmap->bitmap, last_i, NUM_PHY_STATS); + last_i += NUM_PHY_STATS; } int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, |