]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb8b8f98541e51e91a28230d93e84da17349a0c9c
tree940e1bd72eb48ad486ee6d3961b1b57d9825ba5a
parent6b62593a79d978b6e0f45f3cea7f4c4172024d04
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: 02cd6d037a7a ("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