# 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 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/02/3419897
- Thread: https://ratatoskr.run/netdev/2026/02/3413894/t.md

```text
On Fri, 20 Feb 2026 at 01:42, Jakub Kicinski [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/

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?
```
