# Re: \[RFC net-next PATCH 0/2\] net: Split ndo\_set\_rx\_mode into snapshot and deferred write

- From: I Viswanath \<hidden\>
- Date: 2025-10-24 05:32:02 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/10/3265211
- Thread: https://ratatoskr.run/netdev/2025/10/3258686/t.md

```text
On Thu, 23 Oct 2025 at 05:16, Jacob Keller [ref] wrote:
>
> Is there any mechanism to make this guarantee either implemented or at
> least verified by the core? If not that, what about some sort of way to
> lint driver code and make sure its correct?

From my observations, The sane drivers modify rx_config related
registers either through the set_rx_mode function or the unlocked
version (prefixed with __)
I am not sure how to convert this to a validation of that kind.

Basically the end result should be that warnings are generated when
those functions are called
normally but not when they are called through ops->set_rx_mode.
Coccinelle might be able to do
something like this.

Related to this, I don't think a sed would be sufficient as there
might be (in theory) cases where
the function has to do a "synchronous" rx write (flush the work queue)
for correctness
but it should be good enough for most cases.

I am also not sure what is to be done if the scheduled function just
never executes.
```
