vxlan: Use a per-namespace nexthop listener instead of a global one
authorIdo Schimmel <idosch@nvidia.com>
Sun, 1 Nov 2020 11:39:26 +0000 (13:39 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Nov 2020 23:22:49 +0000 (15:22 -0800)
commit626d667b19608c64d86cd71e6ecaa9ddc8650361
treeea784ac6b46c92bfd1291479184c57c6f9b7125f
parent12c9ee3cb4dc554abced62e9e54ff86bb74fc08c
vxlan: Use a per-namespace nexthop listener instead of a global one

The nexthop notification chain is a per-namespace chain and not a global
one like the netdev notification chain.

Therefore, a single (global) listener cannot be registered to all these
chains simultaneously as it will result in list corruptions whenever
listeners are registered / unregistered.

Instead, register a different listener in each namespace.

Currently this is not an issue because only the VXLAN driver registers a
listener to this chain, but this is going to change with netdevsim and
mlxsw also registering their own listeners.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20201101113926.705630-1-idosch@idosch.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/vxlan.c