Thread (66 messages) 66 messages, 5 authors, 2025-08-06

Re: [RFC v1 21/22] net: parametrise mp open with a queue config

From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-08-02 00:10:10
Also in: io-uring

On Mon, 28 Jul 2025 12:04:25 +0100 Pavel Begunkov wrote:
This patch allows memory providers to pass a queue config when opening a
queue. It'll be used in the next patch to pass a custom rx buffer length
from zcrx. As there are many users of netdev_rx_queue_restart(), it's
allowed to pass a NULL qcfg, in which case the function will use the
default configuration.
This is not exactly what I anticipated, TBH, I was thinking of
extending the config stuff with another layer.. Drivers will
restart their queues for most random reasons, so we need to be able 
to reconstitute this config easily and serve it up via
netdev_queue_config(). This was, IIUC, also Mina's first concern.

My thinking was that the config would be constructed like this:

  qcfg = init_to_defaults()
  drv_def = get_driver_defaults()
  for each setting:
    if drv_def.X.set:
       qcfg.X = drv_def.X.value
    if dev.config.X.set:
       qcfg.X = dev.config.X.value
    if dev.config.qcfg[qid].X.set:
       qcfg.X = dev.config.qcfg[qid].X.value
    if dev.config.mp[qid].X.set:               << this was not in my
       qcfg.X = dev.config.mp[qid].X.value     << RFC series

Since we don't allow MP to be replaced atomically today, we don't
actually have to place the mp overrides in the config struct and
involve the whole netdev_reconfig_start() _swap() _free() machinery.
We can just stash the config in the queue state, and "logically"
do what I described above.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help