]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix using wrong stats_grps in mlx5e_update_ndo_stats()
authorAlaa Hleihel <alaa@nvidia.com>
Tue, 25 Aug 2020 07:41:50 +0000 (10:41 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 22 Sep 2020 00:22:23 +0000 (17:22 -0700)
commitc22d202e38d0a3b30cfc1b007adc4356b008d620
tree81573ca8fd022603d8a42f3c4f3d871a1e3c910d
parent0b6c8a6c180e76016f6632706143ccbd90c2008d
net/mlx5e: Fix using wrong stats_grps in mlx5e_update_ndo_stats()

The cited commit started to reuse function mlx5e_update_ndo_stats() for
the representors as well.
However, the function is hard-coded to work on mlx5e_nic_stats_grps only.
Due to this issue, the representors statistics were not updated in the
output of "ip -s".

Fix it to work with the correct group by extracting it from the caller's
profile.

Also, while at it and since this function became generic, move it to
en_stats.c and rename it accordingly.

Fixes: 585f22fe4bc6 ("net/mlx5e: Convert rep stats to mlx5e_stats_grp-based infra")
Signed-off-by: Alaa Hleihel <alaa@nvidia.com>
Reviewed-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.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