Thread (13 messages) flat view 13 messages, 4 authors, 2026-02-21

Re: [PATCH net v1] net: defer __dev_set_promiscuity() to avoid sleeping in atomic context

From: I Viswanath <hidden>
Date: 2026-02-20 05:21:21
Also in: lkml

On Fri, 20 Feb 2026 at 01:42, Jakub Kicinski [off-list ref] 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@gmail.com/ (local)

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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help