summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/layout.rs
diff options
context:
space:
mode:
authorDimitri Daskalakis <daskald@meta.com>2026-10-16 17:54:01 -0700
committerJakub Kicinski <kuba@kernel.org>2026-10-20 13:50:27 -0700
commit23dd5be7e19ceab8c1c79110ee3552bcabc463ef (patch)
tree54cb386480d5dba40bc35fbb188523b31f105a37 /rust/kernel/alloc/layout.rs
parentf434191f93884c9de58c38f18ac7fc7f1fdf9e42 (diff)
downloadlinux-23dd5be7e19ceab8c1c79110ee3552bcabc463ef.tar.gz
linux-23dd5be7e19ceab8c1c79110ee3552bcabc463ef.zip
net/mlx5e: Update netdev features only after a successful ringparam set
mlx5 couples HW-GRO with tcp-data-split. If a user sets rx-gro-hw on -> tcp-data-split on -> rx-gro-hw off, the driver will leave HW-GRO on. mlx5e_ethtool_set_tcp_data_split() calls netdev_update_features() when tcp-data-split goes from enabled to disabled in case HW-GRO needs to be released. mlx5e_fix_features() reads the new HDS config from dev->cfg_pending, so HW-GRO is released before all ring parameters are validated. If the subsequent call to mlx5e_ethtool_set_ringparam() fails, the ethtool core discards the pending change and reports tcp-data-split enabled. The device is no longer splitting, and subsequent ring changes are blocked. Move the call to netdev_update_features() after mlx5e_ethtool_set_ringparam() exits successfully. The issue was discovered by manual code inspection during review of a change that stops mlx5 users from disabling tcp-data-split. It was reproduced on a ConnectX-7 with ethtool alone. Steps to reproduce: ethtool -K eth0 rx-gro-hw on ethtool -G eth0 tcp-data-split on ethtool -K eth0 rx-gro-hw off # HW-GRO kept on for tcp-data-split ethtool -G eth0 tcp-data-split off rx 1 # de-sync driver & kernel state netlink error: mlx5_core: rx (1) < min (16) netlink error: Invalid argument ethtool -G eth0 rx 1024 # valid ring changes are now blocked netlink error: mlx5_core: TCP-data-split is not supported when GRO HW is disabled netlink error: Invalid argument This is not a terminal state, users can recover by setting rx-gro-hw on. With the fix, the failing ringparam set leaves rx-gro-hw on and later ring changes succeed. Fixes: 46bcce5dfd33 ("net/mlx5e: Support ethtool tcp-data-split settings") Reported-by: Björn Töpel <bjorn@kernel.org> Closes: https://lore.kernel.org/87se2grw3d.fsf@all.your.base.are.belong.to.us/ Signed-off-by: Dimitri Daskalakis <daskald@meta.com> Reviewed-by: Björn Töpel <bjorn@kernel.org> Reviewed-by: Nimrod Oren <noren@nvidia.com> Acked-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20261017005401.1582755-1-dimitri.daskalakis1@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/layout.rs')
0 files changed, 0 insertions, 0 deletions