]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/mlx5e: resize configured default RSS context table on channel change
authorYael Chemla <ychemla@nvidia.com>
Mon, 11 May 2026 17:27:18 +0000 (20:27 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 14 May 2026 02:10:24 +0000 (19:10 -0700)
commit4f59c22f26f7723ab2ca6d787d7997b1314ff4f2
tree88512fd9fc47d6bdba55861d859fb6796283daea
parent6bf1c27586b641eca081ebf04f34085679789f83
net/mlx5e: resize configured default RSS context table on channel change

mlx5e_ethtool_set_channels() rejected channel count changes that
required a different RQT size when the default context indirection
table was user-configured. This restriction was introduced by
commit ee3572409f74 ("net/mlx5e: RSS, Block changing channels number
when RXFH is configured").

Lift the restriction. Validate the resize upfront with
ethtool_rxfh_indir_can_resize(), then fold or unfold the table
in-place via ethtool_rxfh_indir_resize() inside state_lock, before
mlx5e_safe_switch_params(), so the preactivate callback sees the
correct table content when it programs the HW.

Signed-off-by: Yael Chemla <ychemla@nvidia.com>
Reviewed-by: Nimrod Oren <noren@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260511172719.330490-5-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/rss.c
drivers/net/ethernet/mellanox/mlx5/core/en/rss.h
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.h
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c