aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInbar Karmy <inbark@mellanox.com>2017-08-14 16:12:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-20 08:22:08 +0200
commit53c5525785bc831f50c4eed741f4e7f6413d0057 (patch)
tree432f64510a0f9d49c5d76fffaec86ed2acca5a56
parentnet/mlx5e: Fix dangling page pointer on DMA mapping error (diff)
downloadlinux-stable-53c5525785bc831f50c4eed741f4e7f6413d0057.tar.xz
linux-stable-53c5525785bc831f50c4eed741f4e7f6413d0057.zip
net/mlx5e: Don't override user RSS upon set channels
[ Upstream commit 5a8e12678c767ccf8bb16d6237569e4a707d655b ] Currently, increasing the number of combined channels is changing the RSS spread to use the new created channels. Prevent the RSS spread change in case the user explicitly declare it, to avoid overriding user configuration. Tested: when RSS default: # ethtool -L ens8 combined 4 RSS spread will change and point to 4 channels. # ethtool -X ens8 equal 4 # ethtool -L ens8 combined 6 RSS will not change after increasing the number of the channels. Fixes: 8bf368620486 ('ethtool: ensure channel counts are within bounds during SCHANNELS') Signed-off-by: Inbar Karmy <inbark@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 16486dff1493..a60f6f2fa4e4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -580,8 +580,10 @@ static int mlx5e_set_channels(struct net_device *dev,
new_channels.params = priv->channels.params;
new_channels.params.num_channels = count;
- mlx5e_build_default_indir_rqt(priv->mdev, new_channels.params.indirection_rqt,
- MLX5E_INDIR_RQT_SIZE, count);
+ if (!netif_is_rxfh_configured(priv->netdev))
+ mlx5e_build_default_indir_rqt(priv->mdev,
+ new_channels.params.indirection_rqt,
+ MLX5E_INDIR_RQT_SIZE, count);
if (!test_bit(MLX5E_STATE_OPENED, &priv->state)) {
priv->channels.params = new_channels.params;