diff options
author | Alaa Hleihel <alaa@nvidia.com> | 2020-08-25 10:41:50 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2020-09-21 17:22:23 -0700 |
commit | b521105b68a2e3334d69202fb354d7b711b01aa3 (patch) | |
tree | 81573ca8fd022603d8a42f3c4f3d871a1e3c910d /drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c | |
parent | 47c97e6b10a1e3680cad539929da092bfa535446 (diff) | |
download | linux-stable-b521105b68a2e3334d69202fb354d7b711b01aa3.tar.gz linux-stable-b521105b68a2e3334d69202fb354d7b711b01aa3.tar.bz2 linux-stable-b521105b68a2e3334d69202fb354d7b711b01aa3.zip |
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: 8a236b15144b ("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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c b/drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c index 8fe8b4d6ad1c..254c84739046 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c @@ -51,7 +51,7 @@ static void mlx5e_monitor_counters_work(struct work_struct *work) monitor_counters_work); mutex_lock(&priv->state_lock); - mlx5e_update_ndo_stats(priv); + mlx5e_stats_update_ndo_stats(priv); mutex_unlock(&priv->state_lock); mlx5e_monitor_counter_arm(priv); } |