]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vxlan: Convert FDB garbage collection to RCU
authorIdo Schimmel <idosch@nvidia.com>
Tue, 15 Apr 2025 12:11:37 +0000 (15:11 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 22 Apr 2025 09:11:15 +0000 (11:11 +0200)
commita6d04f8937e3a721c3a3578fc18b28cb59b15f42
tree583f1f99ca75fb05a2603683b1f3238a5b3c063b
parent7aa0dc750d4bca9545c89803e3779bdff4c58b58
vxlan: Convert FDB garbage collection to RCU

Instead of holding the FDB hash lock when traversing the FDB linked list
during garbage collection, use RCU and only acquire the lock for entries
that need to be removed (aged out).

Avoid races by using hlist_unhashed() to check that the entry has not
been removed from the list by another thread.

Note that vxlan_fdb_destroy() uses hlist_del_init_rcu() to remove an
entry from the list which should cause list_unhashed() to return true.

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