All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v4 00/11] net: hold instance lock during NETDEV_UP/REGISTER
@ 2025-03-31 15:05 Stanislav Fomichev
  2025-03-31 15:05 ` [PATCH net v4 01/11] net: switch to netif_disable_lro in inetdev_init Stanislav Fomichev
                   ` (10 more replies)
  0 siblings, 11 replies; 22+ messages in thread
From: Stanislav Fomichev @ 2025-03-31 15:05 UTC (permalink / raw)
  To: netdev; +Cc: davem, edumazet, kuba, pabeni

Solving the issue reported by Cosmin in [0] requires consistent
lock during NETDEV_UP/REGISTER notifiers. This series
addresses that (along with some other fixes in net/ipv4/devinet.c
and net/ipv6/addrconf.c) and appends the patches from Jakub
that were conditional on consistent locking in NETDEV_UNREGISTER.

0: https://lore.kernel.org/netdev/700fa36b94cbd57cfea2622029b087643c80cbc9.camel@nvidia.com/

v4:
- make sure EXPORT_IPV6_MOD works for !CONFIG_INET configs (Intel LKP)

v3:
- s/EXPORT_SYMBOL/EXPORT_IPV6_MOD/ for netif_disable_lro (Jakub)
- drop netdev_lockdep_set_classes mlx5 patch (Jakub)
- update doc to clarify that instance lock is held for ops-locked
  devices only, also list NETDEV_UNREGISTER as unlocked (Jakub)
- drop patch that unlocks and relocks bonding and teaming
  UNREGISTER notifiers (Jakub)
- lock ops (instead of unconditional instance lock) in addrconf (Jakub)
- rename rtnl_net_debug.c to lock_debug.c and share rtnl_net_debug_event
  (as netdev_debug_event) with netdevsim (Jakub)
- use netdevsim in one of the existing tests that set netns (Jakub)
- add ops locks around xp_clear_dev in xsk_notifier

v2:
- export netdev_get_by_index_lock
- new patch: add netdev_lockdep_set_classes to mlx5
- new patch: exercise notifiers in netdevsim
- ignore specific locked netdev in call_netdevice_register_notifiers,
  not all

Jakub Kicinski (3):
  net: designate XSK pool pointers in queues as "ops protected"
  netdev: add "ops compat locking" helpers
  netdev: don't hold rtnl_lock over nl queue info get when possible

Stanislav Fomichev (8):
  net: switch to netif_disable_lro in inetdev_init
  net: hold instance lock during NETDEV_REGISTER/UP
  net: use netif_disable_lro in ipv6_add_dev
  net: rename rtnl_net_debug to lock_debug
  netdevsim: add dummy device notifiers
  net: dummy: request ops lock
  docs: net: document netdev notifier expectations
  selftests: net: use netdevsim in netns test

 Documentation/networking/netdevices.rst     | 22 ++++++++
 drivers/net/dummy.c                         |  1 +
 drivers/net/netdevsim/netdev.c              | 10 ++++
 drivers/net/netdevsim/netdevsim.h           |  3 +
 include/linux/netdevice.h                   |  3 +-
 include/net/ip.h                            | 16 +++---
 include/net/netdev_lock.h                   | 27 +++++++++
 include/net/netdev_rx_queue.h               |  6 +-
 net/core/Makefile                           |  2 +-
 net/core/dev.c                              | 62 ++++++++++++++++++++-
 net/core/dev.h                              | 15 +++++
 net/core/dev_api.c                          |  4 +-
 net/core/{rtnl_net_debug.c => lock_debug.c} | 14 +++--
 net/core/netdev-genl.c                      | 18 +++---
 net/core/rtnetlink.c                        | 10 ++--
 net/ipv4/devinet.c                          |  2 +-
 net/ipv6/addrconf.c                         | 15 ++++-
 net/xdp/xsk.c                               |  2 +
 net/xdp/xsk_buff_pool.c                     |  7 ++-
 tools/testing/selftests/net/lib.sh          | 25 +++++++++
 tools/testing/selftests/net/netns-name.sh   | 13 +++--
 21 files changed, 229 insertions(+), 48 deletions(-)
 rename net/core/{rtnl_net_debug.c => lock_debug.c} (90%)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2025-03-31 21:49 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-31 15:05 [PATCH net v4 00/11] net: hold instance lock during NETDEV_UP/REGISTER Stanislav Fomichev
2025-03-31 15:05 ` [PATCH net v4 01/11] net: switch to netif_disable_lro in inetdev_init Stanislav Fomichev
2025-03-31 20:43   ` Jakub Kicinski
2025-03-31 21:06     ` Stanislav Fomichev
2025-03-31 15:05 ` [PATCH net v4 02/11] net: hold instance lock during NETDEV_REGISTER/UP Stanislav Fomichev
2025-03-31 20:48   ` Jakub Kicinski
2025-03-31 21:13     ` Stanislav Fomichev
2025-03-31 21:27       ` Jakub Kicinski
2025-03-31 15:05 ` [PATCH net v4 03/11] net: use netif_disable_lro in ipv6_add_dev Stanislav Fomichev
2025-03-31 15:05 ` [PATCH net v4 04/11] net: rename rtnl_net_debug to lock_debug Stanislav Fomichev
2025-03-31 20:48   ` Jakub Kicinski
2025-03-31 15:05 ` [PATCH net v4 05/11] netdevsim: add dummy device notifiers Stanislav Fomichev
2025-03-31 20:54   ` Jakub Kicinski
2025-03-31 21:20     ` Stanislav Fomichev
2025-03-31 15:05 ` [PATCH net v4 06/11] net: dummy: request ops lock Stanislav Fomichev
2025-03-31 15:05 ` [PATCH net v4 07/11] docs: net: document netdev notifier expectations Stanislav Fomichev
2025-03-31 20:58   ` Jakub Kicinski
2025-03-31 21:49     ` Stanislav Fomichev
2025-03-31 15:06 ` [PATCH net v4 08/11] selftests: net: use netdevsim in netns test Stanislav Fomichev
2025-03-31 15:06 ` [PATCH net v4 09/11] net: designate XSK pool pointers in queues as "ops protected" Stanislav Fomichev
2025-03-31 15:06 ` [PATCH net v4 10/11] netdev: add "ops compat locking" helpers Stanislav Fomichev
2025-03-31 15:06 ` [PATCH net v4 11/11] netdev: don't hold rtnl_lock over nl queue info get when possible Stanislav Fomichev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.