public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Fomichev <sdf@fomichev.me>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com
Subject: [PATCH net-next 00/11] net: sleepable ndo_set_rx_mode
Date: Fri, 13 Mar 2026 07:51:02 -0700	[thread overview]
Message-ID: <20260313145113.1424442-1-sdf@fomichev.me> (raw)

This series adds a new ndo_set_rx_mode_async callback that enables
drivers to handle address list updates in a sleepable context. The
current ndo_set_rx_mode is called under the netif_addr_lock spinlock
with BHs disabled, which prevents drivers from sleeping. This is
problematic for ops-locked drivers that need to sleep.

The approach:
1. Add snapshot/reconcile infrastructure for address lists
2. Introduce dev_rx_mode_work that takes snapshots under the lock,
   drops the lock, calls the driver, then reconciles changes back
3. Move promiscuity handling into the scheduled work as well
4. Convert existing ops-locked drivers to ndo_set_rx_mode_async
5. Add a warning for ops-locked drivers still using ndo_set_rx_mode
6. Add a selftest exercising the team+bridge+macvlan topology that
   triggers the addr_lock -> ops_lock ordering issue

Stanislav Fomichev (11):
  net: add address list snapshot and reconciliation infrastructure
  net: introduce ndo_set_rx_mode_async and dev_rx_mode_work
  net: move promiscuity handling into dev_rx_mode_work
  fbnic: convert to ndo_set_rx_mode_async
  mlx5: convert to ndo_set_rx_mode_async
  bnxt: convert to ndo_set_rx_mode_async
  iavf: convert to ndo_set_rx_mode_async
  netdevsim: convert to ndo_set_rx_mode_async
  dummy: convert to ndo_set_rx_mode_async
  net: warn ops-locked drivers still using ndo_set_rx_mode
  selftests: net: add team_bridge_macvlan rx_mode test

 Documentation/networking/netdevices.rst       |  12 +
 drivers/net/dummy.c                           |   6 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt.c     |  31 +-
 drivers/net/ethernet/intel/iavf/iavf_main.c   |  14 +-
 .../net/ethernet/mellanox/mlx5/core/en/fs.h   |   5 +-
 .../net/ethernet/mellanox/mlx5/core/en_fs.c   |  33 +-
 .../net/ethernet/mellanox/mlx5/core/en_main.c |  16 +-
 .../net/ethernet/meta/fbnic/fbnic_netdev.c    |  20 +-
 .../net/ethernet/meta/fbnic/fbnic_netdev.h    |   4 +-
 drivers/net/ethernet/meta/fbnic/fbnic_pci.c   |   4 +-
 drivers/net/ethernet/meta/fbnic/fbnic_rpc.c   |   2 +-
 drivers/net/netdevsim/netdev.c                |   8 +-
 include/linux/netdevice.h                     |  26 ++
 net/core/dev.c                                | 175 ++++++++--
 net/core/dev.h                                |   1 +
 net/core/dev_addr_lists.c                     | 110 +++++-
 net/core/dev_addr_lists_test.c                | 321 +++++++++++++++++-
 tools/testing/selftests/net/rtnetlink.sh      |  44 +++
 18 files changed, 749 insertions(+), 83 deletions(-)

-- 
2.53.0


             reply	other threads:[~2026-03-13 14:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 14:51 Stanislav Fomichev [this message]
2026-03-13 14:51 ` [PATCH net-next 01/11] net: add address list snapshot and reconciliation infrastructure Stanislav Fomichev
2026-03-13 14:51 ` [PATCH net-next 02/11] net: introduce ndo_set_rx_mode_async and dev_rx_mode_work Stanislav Fomichev
2026-03-13 14:51 ` [PATCH net-next 03/11] net: move promiscuity handling into dev_rx_mode_work Stanislav Fomichev
2026-03-13 14:51 ` [PATCH net-next 04/11] fbnic: convert to ndo_set_rx_mode_async Stanislav Fomichev
2026-03-13 14:51 ` [PATCH net-next 05/11] mlx5: " Stanislav Fomichev
2026-03-13 16:13   ` Cosmin Ratiu
2026-03-16 15:42     ` Stanislav Fomichev
2026-03-13 14:51 ` [PATCH net-next 06/11] bnxt: " Stanislav Fomichev
2026-03-13 18:36   ` Michael Chan
2026-03-16 15:50     ` Stanislav Fomichev
2026-03-16 17:33       ` Michael Chan
2026-03-13 14:51 ` [PATCH net-next 07/11] iavf: " Stanislav Fomichev
2026-03-13 14:51 ` [PATCH net-next 08/11] netdevsim: " Stanislav Fomichev
2026-03-13 14:51 ` [PATCH net-next 09/11] dummy: " Stanislav Fomichev
2026-03-13 14:51 ` [PATCH net-next 10/11] net: warn ops-locked drivers still using ndo_set_rx_mode Stanislav Fomichev
2026-03-13 14:51 ` [PATCH net-next 11/11] selftests: net: add team_bridge_macvlan rx_mode test Stanislav Fomichev
2026-03-13 19:38 ` [PATCH net-next 00/11] net: sleepable ndo_set_rx_mode Jakub Kicinski
2026-03-16 15:58   ` Stanislav Fomichev
2026-03-14 18:48 ` [syzbot ci] " syzbot ci

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260313145113.1424442-1-sdf@fomichev.me \
    --to=sdf@fomichev.me \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox