From: Jiri Pirko <j...@mellanox.com> Some drivers, like mlxsw, are not interested in notifications coming in for netdevices from other network namespaces. So introduce per-netns notifiers and allow to reduce overhead by listening only for notifications from the same netns.
This is also a preparation for upcoming patchset "devlink: allow devlink instances to change network namespace". This resolves deadlock during reload mlxsw into initial netns made possible by 328fbe747ad4 ("net: Close race between {un, }register_netdevice_notifier() and setup_net()/cleanup_net()"). Jiri Pirko (3): net: push loops and nb calls into helper functions net: introduce per-netns netdevice notifiers mlxsw: spectrum: Use per-netns netdevice notifier registration .../net/ethernet/mellanox/mlxsw/spectrum.c | 9 +- include/linux/netdevice.h | 6 + include/net/net_namespace.h | 6 +- net/core/dev.c | 176 +++++++++++++++--- 4 files changed, 165 insertions(+), 32 deletions(-) -- 2.21.0