vxlan: Unsplit default FDB entry creation and notification
authorIdo Schimmel <idosch@nvidia.com>
Tue, 15 Apr 2025 12:11:32 +0000 (15:11 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 22 Apr 2025 09:11:15 +0000 (11:11 +0200)
commitccc203b9a846c1d5262b5c60565ff79930c13477
treedce308eb98488776b8ca4a19c0a6669f9ee9839f
parent69281e0fe18ab60e7b67e328214ffbd8609b13b4
vxlan: Unsplit default FDB entry creation and notification

Commit 0241b836732f ("vxlan: fix default fdb entry netlink notify
ordering during netdev create") split the creation of the default FDB
entry from its notification to avoid sending a RTM_NEWNEIGH notification
before RTM_NEWLINK.

Previous patches restructured the code so that the default FDB entry is
created after registering the VXLAN device and the notification about
the new entry immediately follows its creation.

Therefore, simplify the code and revert back to vxlan_fdb_update() which
takes care of both creating the FDB entry and notifying user space
about it.

Hold the FDB hash lock when calling vxlan_fdb_update() like it expects.
A subsequent patch will add a lockdep assertion to make sure this is
indeed the case.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20250415121143.345227-5-idosch@nvidia.com
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/vxlan/vxlan_core.c