Netdev List
 help / color / mirror / Atom feed
* [PATCH net v5 0/2] vxlan: reset the remote's dst cache when snooping moves a MAC
@ 2026-11-15  4:06 Zhefu Peng
  2026-11-15  4:06 ` [PATCH net v5 1/2] " Zhefu Peng
  2026-11-15  4:06 ` [PATCH net v5 2/2] selftests: net: add a test for vxlan snooping moving " Zhefu Peng
  0 siblings, 2 replies; 3+ messages in thread
From: Zhefu Peng @ 2026-11-15  4:06 UTC (permalink / raw)
  To: netdev
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, horms, kuniyu,
	mschiffer, nicolas.dichtel, shuah, linux-kselftest

When a learning VXLAN device snoops a known MAC from another VTEP, it
rewrites the remote's IP address in place but keeps the remote's
dst_cache and remote_ifindex. Traffic to the moved MAC can then use the
route cached for the previous remote and be blackholed. Patch 1 updates
the remote the way vxlan_fdb_replace() does, and compares
remote_ifindex in the early return only for link-local sources, so a
"via" device set on a dynamic entry is kept. Patch 2 adds a selftest.

Results on net with 1, 2 and 4 CPUs, per selftest case (move behind a
router, move to link-local, via kept):
- without patch 1: 0/8, 0/8, 8/8
- with v4 of patch 1: 8/8, 8/8, 0/8
- with this version: 16/16, 16/16, 16/16

v5:
- compare remote_ifindex in the early return only for link-local
  sources, so traffic from the same remote no longer resets a "via"
  device to 0 (Sashiko)
- selftest: add a case for the above and keep lines within 80 columns

v4: https://lore.kernel.org/netdev/20261113155133.75090-1-ilskdw@gmail.com/
- add the selftest (Nicolas Dichtel)

v3: https://lore.kernel.org/netdev/20261111180001.2475-1-ilskdw@gmail.com/
- use my real name in From: and Signed-off-by:

v2: https://lore.kernel.org/netdev/20261110153020.9635-1-ilskdw@gmail.com/
- also update remote_ifindex and clear offloaded, as vxlan_fdb_replace() does
- add the IPv6 link-local case to the changelog and a second Fixes tag

v1: https://lore.kernel.org/netdev/20261106144406.66035-1-ilskdw@gmail.com/

Zhefu Peng (2):
  vxlan: reset the remote's dst cache when snooping moves a MAC
  selftests: net: add a test for vxlan snooping moving a MAC

 drivers/net/vxlan/vxlan_core.c                |   5 +-
 tools/testing/selftests/net/Makefile          |   1 +
 .../selftests/net/test_vxlan_snoop_move.sh    | 199 ++++++++++++++++++
 3 files changed, 204 insertions(+), 1 deletion(-)
 create mode 100755 tools/testing/selftests/net/test_vxlan_snoop_move.sh

-- 
2.54.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-15  4:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-15  4:06 [PATCH net v5 0/2] vxlan: reset the remote's dst cache when snooping moves a MAC Zhefu Peng
2026-11-15  4:06 ` [PATCH net v5 1/2] " Zhefu Peng
2026-11-15  4:06 ` [PATCH net v5 2/2] selftests: net: add a test for vxlan snooping moving " Zhefu Peng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox