Re: [PATCH net v1] net: defer __dev_set_promiscuity() to avoid sleeping in atomic context
From: I Viswanath
Date: Fri Feb 20 2026 - 00:21:47 EST
On Fri, 20 Feb 2026 at 01:42, Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> Not sure. Another alternative is to implement the long standing idea of
> having an async / sleeping version of ndo_set_rx_mode() orchestrated
> by the core. Because a lot of drivers need to sleep, anyway, so they
> just schedule a work from that callback.
>
> Then we can say old ndo_set_rx_mode is under netif_addr_lock.
> ndo_set_rx_mode_async is under instance lock.
Hello, I have been working on this idea here :/
https://lore.kernel.org/netdev/20260112181626.20117-1-viswanathiyyappan@xxxxxxxxx/
I am calling it ndo_write_rx_mode but if ndo_set_rx_mode_async sounds
better, I will go with that. As the constructs I would
be introducing in v9 (enable/disable deferred ctx) should be useful
for other NDOs that would want to do their work async, I am looking
for concrete use cases to justify this. Right now, I have
- ndo_set_rx_mode
- ndo_change_rx_flags
- ndo_tx_timeout (Few drivers seem to schedule this and it's under
tx_global_lock spinlock)
Do you mean rtnl_lock when you say instance lock?