]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: add queue config validation callback
authorJakub Kicinski <kuba@kernel.org>
Thu, 22 Jan 2026 00:51:12 +0000 (16:51 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 23 Jan 2026 19:49:02 +0000 (11:49 -0800)
commit8e3245cb30864f93d7706e03e61ca1972ea4f64c
tree2de97fdf787da629af4a0ecce0c8a3b0d62ffd05
parentfc1a78a25c5e3c92132f2975c7b547e67305fcf4
net: add queue config validation callback

I imagine (tm) that as the number of per-queue configuration
options grows some of them may conflict for certain drivers.
While the drivers can obviously do all the validation locally
doing so is fairly inconvenient as the config is fed to drivers
piecemeal via different ops (for different params and NIC-wide
vs per-queue).

Add a centralized callback for validating the queue config
in queue ops. The callback gets invoked before memory provider
is installed, and in the future should also be called when ring
params are modified.

The validation is done after each layer of configuration.
Since we can't fail MP un-binding we must make sure that
the config is valid both before and after MP overrides are
applied. This is moot for now since the set of MP and device
configs are disjoint. It will matter significantly in the future,
so adding it now so that we don't forget..

Link: https://patch.msgid.link/20260122005113.2476634-6-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/netdev_queues.h
net/core/dev.h
net/core/netdev_config.c
net/core/netdev_rx_queue.c