net: fib_notifier: make FIB notifier per-netns
authorJiri Pirko <jiri@mellanox.com>
Thu, 3 Oct 2019 09:49:27 +0000 (11:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Oct 2019 18:10:55 +0000 (11:10 -0700)
commit7c550daffe22a97282effa75fe7c1f6b83563ecb
tree1ae072e80d39ed7d698622e471e077891efa4e90
parenta5facc4cac4dc504397428c936ef1492ce4edd19
net: fib_notifier: make FIB notifier per-netns

Currently all users of FIB notifier only cares about events in init_net.
Later in this patchset, users get interested in other namespaces too.
However, for every registered block user is interested only about one
namespace. Make the FIB notifier registration per-netns and avoid
unnecessary calls of notifier block for other namespaces.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 files changed:
drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/rocker/rocker_main.c
drivers/net/netdevsim/fib.c
include/linux/mroute_base.h
include/net/fib_notifier.h
include/net/ip6_fib.h
include/net/ip_fib.h
net/core/fib_notifier.c
net/core/fib_rules.c
net/ipv4/fib_notifier.c
net/ipv4/fib_trie.c
net/ipv4/ipmr_base.c
net/ipv6/fib6_notifier.c
net/ipv6/ip6_fib.c