Skip to content

Commit

Permalink
net/mlx5e: Keep updating ethtool statistics when the interface is down
Browse files Browse the repository at this point in the history
ethtool statistics should be updated even when the interface is down
since it shows more than just netdev counters, which might change while
the logical link is down.
One useful use case, for example, is when running RoCE traffic over the
interface (while the logical link is down, but physical link is up) and
examining rx_prioX_bytes.

Fixes: f62b8bb ("net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality")
Signed-off-by: Gal Pressman <galp@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
  • Loading branch information
Gal Pressman authored and Saeed Mahameed committed Jan 12, 2018
1 parent 259bbc5 commit e556f6d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ void mlx5e_ethtool_get_ethtool_stats(struct mlx5e_priv *priv,
return;

mutex_lock(&priv->state_lock);
if (test_bit(MLX5E_STATE_OPENED, &priv->state))
mlx5e_update_stats(priv, true);
mlx5e_update_stats(priv, true);
mutex_unlock(&priv->state_lock);

for (i = 0; i < mlx5e_num_stats_grps; i++)
Expand Down

0 comments on commit e556f6d

Please sign in to comment.