RE: [Intel-wired-lan] [PATCH net-next v2 04/13] net: move promiscuity handling into dev_rx_mode_work

From: Loktionov, Aleksandr

Date: Wed Mar 18 2026 - 11:56:04 EST




> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf
> Of Stanislav Fomichev
> Sent: Wednesday, March 18, 2026 4:03 PM
> To: netdev@xxxxxxxxxxxxxxx
> Cc: davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx;
> pabeni@xxxxxxxxxx; horms@xxxxxxxxxx; corbet@xxxxxxx;
> skhan@xxxxxxxxxxxxxxxxxxx; andrew+netdev@xxxxxxx;
> michael.chan@xxxxxxxxxxxx; pavan.chebbi@xxxxxxxxxxxx; Nguyen, Anthony
> L <anthony.l.nguyen@xxxxxxxxx>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@xxxxxxxxx>; saeedm@xxxxxxxxxx; tariqt@xxxxxxxxxx;
> mbloch@xxxxxxxxxx; alexanderduyck@xxxxxx; kernel-team@xxxxxxxx;
> johannes@xxxxxxxxxxxxxxxx; sd@xxxxxxxxxxxxxxx; jianbol@xxxxxxxxxx;
> dtatulea@xxxxxxxxxx; sdf@xxxxxxxxxxx; mohsin.bashr@xxxxxxxxx; Keller,
> Jacob E <jacob.e.keller@xxxxxxxxx>; willemb@xxxxxxxxxx;
> skhawaja@xxxxxxxxxx; bestswngs@xxxxxxxxx; linux-doc@xxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx; intel-wired-lan@xxxxxxxxxxxxxxxx; linux-
> rdma@xxxxxxxxxxxxxxx; linux-wireless@xxxxxxxxxxxxxxx; linux-
> kselftest@xxxxxxxxxxxxxxx; leon@xxxxxxxxxx
> Subject: [Intel-wired-lan] [PATCH net-next v2 04/13] net: move
> promiscuity handling into dev_rx_mode_work
>
> Move unicast promiscuity tracking into dev_rx_mode_work so it runs
> under netdev_ops_lock instead of under the addr_lock spinlock. This is
> required because __dev_set_promiscuity calls dev_change_rx_flags and
> __dev_notify_flags, both of which may need to sleep.
>
> Change ASSERT_RTNL() to netdev_ops_assert_locked() in
> __dev_set_promiscuity, netif_set_allmulti and __dev_change_flags since
> these are now called from the work queue under the ops lock.
>
> Signed-off-by: Stanislav Fomichev <sdf@xxxxxxxxxxx>
> ---
> Documentation/networking/netdevices.rst | 4 ++
> net/core/dev.c | 79 +++++++++++++++++-------
> -
> 2 files changed, 57 insertions(+), 26 deletions(-)
>
> diff --git a/Documentation/networking/netdevices.rst
> b/Documentation/networking/netdevices.rst
> index dc83d78d3b27..5cdaa1a3dcc8 100644
> --- a/Documentation/networking/netdevices.rst
> +++ b/Documentation/networking/netdevices.rst
> @@ -298,6 +298,10 @@ struct net_device synchronization rules
> Notes: Sleepable version of ndo_set_rx_mode. Receives snapshots
> of the unicast and multicast address lists.
>

...

>
> /*
> * Set the flags on our device.
> --
> 2.53.0

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@xxxxxxxxx>