net/mlx5e: Change interrupt moderation channel params also when channels are closed
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Wed, 3 Feb 2021 16:01:03 +0000 (18:01 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 12 Feb 2021 02:50:11 +0000 (18:50 -0800)
commit65ba8594a238c20e458b3d2d39d91067cbffd0b1
tree940e1bd72eb48ad486ee6d3961b1b57d9825ba5a
parent019f93bc4ba3a0dcb77f448ee77fc4c9c1b89565
net/mlx5e: Change interrupt moderation channel params also when channels are closed

struct mlx5e_params contains fields ({rx,tx}_cq_moderation) that depend
on two things: whether DIM is enabled and the state of a private flag
(MLX5E_PFLAG_{RX,TX}_CQE_BASED_MODER). Whenever the DIM state changes,
mlx5e_reset_{rx,tx}_moderation is called to update the fields, however,
only if the channels are open. The flow where the channels are closed
misses the required update of the fields. This commit moves the calls of
mlx5e_reset_{rx,tx}_moderation, so that they run in both flows.

Fixes: ebeaf084ad5c ("net/mlx5e: Properly set default values when disabling adaptive moderation")
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c