vxlan: Always refresh FDB 'updated' time when learning is enabled
authorIdo Schimmel <idosch@nvidia.com>
Tue, 4 Feb 2025 14:55:44 +0000 (16:55 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 6 Feb 2025 02:53:57 +0000 (18:53 -0800)
commitc4f2082bf641d270fd518e8c218196eb26ac1c3c
tree76a97d60a6f11063c500b0f8b755b4b2373cb4ed
parent1370c45d6e7e3cbac4b6dc71f54fd6e167848900
vxlan: Always refresh FDB 'updated' time when learning is enabled

Currently, when learning is enabled and a packet is received from the
expected remote, the 'updated' field of the FDB entry is not refreshed.
This will become a problem when we switch the VXLAN driver to age out
entries based on the 'updated' field.

Solve this by always refreshing an FDB entry when we receive a packet
with a matching source MAC address, regardless if it was received via
the expected remote or not as it indicates the host is alive. This is
consistent with the bridge driver's FDB.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/20250204145549.1216254-4-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/vxlan/vxlan_core.c