]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 15 Mar 2021 14:08:58 +0000 (15:08 +0100)
commit897cbcaa576f79ced603dfc83a38f5ef2dc146d2
tree84f924344e25313fb30c49222c4961faa233d9f7
parentc651d9c91f00d353565dd088202f4295c39f748f
net/mlx5e: Change interrupt moderation channel params also when channels are closed

[ Upstream commit 65ba8594a238c20e458b3d2d39d91067cbffd0b1 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c