Re: [RFC v1 17/22] netdev: add support for setting rx-buf-len per queue
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-08-01 23:37:25
Also in:
io-uring
On Mon, 28 Jul 2025 16:10:36 -0700 Mina Almasry wrote:
I don't see this used anywhere.
Good catch, I think I was planning to reuse the full structs from ethtool. And when I gave up I forgot to re-implement the checks.
But more generally, I'm a bit concerned about protecting drivers that don't support configuring one particular queue config. I think likely supported_ring_params needs to be moved earlier to the patch which adds per queue netdev_configs to the queue API, and probably as part of that patch core needs to make sure it's never asking a driver that doesn't support changing a netdev_queue_config to do so?
I may be missing your point, but the "supported_params" flags are just an internal kernel thing. Based on our rich experience of drivers not validating inputs the "supported" flags just tell the core that a driver will pay attention to the member of a struct. We can add new members without having to go over all existing drivers to add input validation. The flag doesn't actually say anything about particular configuration being... well.. supported. It's just that the driver promises to interpret it.
Some thought may be given to moving the entire configuration story outside of queue_mem_alloc/free queue_start/stop altogether to new ndos where core can easily check if the ndo is supported otherwise per-queue config is not supported. Otherwise core needs to be careful never to attempt a config that is not supported?
The configuration is of the queues. The queue configuration belongs in the queue APIs.