aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
diff options
context:
space:
mode:
authorEran Ben Elisha <eranbe@mellanox.com>2018-05-29 11:06:31 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2018-06-01 16:48:14 -0700
commit6c63efe4cfabf230a8ed4b1d880249875ffdac13 (patch)
treef0a68926d7f2def94b8a5efac9773bacd3f27dc3 /drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
parentnet/mlx5e: Present SW stats when state is not opened (diff)
downloadlinux-dev-6c63efe4cfabf230a8ed4b1d880249875ffdac13.tar.xz
linux-dev-6c63efe4cfabf230a8ed4b1d880249875ffdac13.zip
net/mlx5e: Remove redundant active_channels indication
Now, when all channels stats are saved regardless of the channel's state {open, closed}, we can safely remove this indication and the stats spin lock which protects it. Fixes: 76c3810bade3 ("net/mlx5e: Avoid reset netdev stats on configuration changes") Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_stats.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
index 3b2aed43f660..697dc7397ba2 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
@@ -114,9 +114,6 @@ void mlx5e_grp_sw_update_stats(struct mlx5e_priv *priv)
int i;
memset(s, 0, sizeof(*s));
- read_lock(&priv->stats_lock);
- if (!priv->channels_active)
- goto out;
for (i = 0; i < priv->profile->max_nch(priv->mdev); i++) {
struct mlx5e_channel_stats *channel_stats =
@@ -177,8 +174,6 @@ void mlx5e_grp_sw_update_stats(struct mlx5e_priv *priv)
}
memcpy(&priv->stats.sw, s, sizeof(*s));
-out:
- read_unlock(&priv->stats_lock);
}
static const struct counter_desc q_stats_desc[] = {