OSDN Git Service

mlx5: add pause frame stats
authorJakub Kicinski <kuba@kernel.org>
Tue, 15 Sep 2020 00:11:58 +0000 (17:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Sep 2020 20:26:29 +0000 (13:26 -0700)
commit098d9ed9efb3e6edfbe6f1b3cdfd5b2ad3228bf2
treee2edb39b9f5bc3be0120a8c295df4846bde16ffc
parenteabbe2bb688b0dfb41f0d62a77c6371da6d371ed
mlx5: add pause frame stats

Plumb through all the indirection and copy some code from
ethtool -S. The names of the group indicate that these are
the stats we are after (and Saeed confirms it).

v3:
 - fix build in mlx5_rep
v2:
 - drop the ethool helper and call stats directly
 - don't pass 0 as initialized to in buffer
 - use local buffer

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.h