]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net, ethtool: Disallow leased real rxqs to be resized
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 2 Apr 2026 23:10:21 +0000 (01:10 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Apr 2026 01:21:46 +0000 (18:21 -0700)
commit22fdf28f7c03d3c130103ee77382c53d293f1732
tree3a90fbcaf48218f4ac41c2c263b5c1ff065c4595
parent21d58b35e500ae099188c1be8398442733bc0d89
net, ethtool: Disallow leased real rxqs to be resized

Similar to AF_XDP, do not allow queues in a physical netdev to be resized
by ethtool -L when they are leased. Cover channel resize paths (both
netlink and ioctl) to reject resizing when the queues would be affected.

Given we need to have different checks for RX vs TX, detangle the code into
a two-loop version rather than the range of new_combined + min(new_rx, new_tx)
to old_combined + max(old_rx, old_tx).

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Co-developed-by: David Wei <dw@davidwei.uk>
Signed-off-by: David Wei <dw@davidwei.uk>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/20260402231031.447597-5-daniel@iogearbox.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/channels.c
net/ethtool/ioctl.c