]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Don't change interrupt moderation params when DIM is enabled
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Wed, 3 Feb 2021 15:55:58 +0000 (17:55 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 12 Feb 2021 02:50:10 +0000 (18:50 -0800)
commit6b62593a79d978b6e0f45f3cea7f4c4172024d04
tree24af267740e85896b7fc7b65f0833b2e15a769d2
parent8fab33f1078eb3caff00229a69fd842f3316bf8f
net/mlx5e: Don't change interrupt moderation params when DIM is enabled

When mlx5e_ethtool_set_coalesce doesn't change DIM state
(enabled/disabled), it calls mlx5e_set_priv_channels_coalesce
unconditionally, which in turn invokes a firmware command to set
interrupt moderation parameters. It shouldn't happen while DIM manages
those parameters dynamically (it might even be happening at the same
time).

This patch fixes it by splitting mlx5e_set_priv_channels_coalesce into
two functions (for RX and TX) and calling them only when DIM is disabled
(for RX and TX respectively).

Fixes: 4f105e5ffd1d ("net/mlx5e: Support adaptive RX coalescing")
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