* [PATCH bpf-next] selftests/bpf: Create the vxlan devices of test_tunnel with their MAC
@ 2026-10-09 1:48 Qiliang Yuan
2026-10-15 16:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Qiliang Yuan @ 2026-10-09 1:48 UTC (permalink / raw)
To: Andrii Nakryiko, Eduard Zingerman, Ihor Solodrai,
Alexei Starovoitov, Daniel Borkmann, Kumar Kartikeya Dwivedi,
Martin KaFai Lau, Song Liu, Yonghong Song, Jiri Olsa,
Emil Tsalapatis, Shuah Khan, Kaixi Fan
Cc: bpf, linux-kselftest, linux-kernel, Qiliang Yuan
The vxlan tests of test_tunnel create a tunnel device in the initial
netns with "ip link add", and then give it the MAC address that the
static neighbor entry at the other end points to with "ip link set".
systemd-udevd assigns new devices of the initial netns a MAC address of
its own, following its MACAddressPolicy, when it handles their uevent.
When it gets to that after the test set the address, the replies sent
to the configured MAC are dropped as meant for another host, and the
ping of vxlan_tunnel fails after 10 seconds.
Pass the address to "ip link add". udevd leaves alone the address of a
device that was created with one.
Fixes: 1ee7efd40abf ("selftests/bpf: Move vxlan tunnel testcases to test_progs")
Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com>
---
tools/testing/selftests/bpf/prog_tests/test_tunnel.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/test_tunnel.c b/tools/testing/selftests/bpf/prog_tests/test_tunnel.c
index eb93099312720..7b35bf9498056 100644
--- a/tools/testing/selftests/bpf/prog_tests/test_tunnel.c
+++ b/tools/testing/selftests/bpf/prog_tests/test_tunnel.c
@@ -161,9 +161,9 @@ static int add_vxlan_tunnel(void)
IP4_ADDR2_VETH1, MAC_VETH1);
/* root namespace */
- SYS(fail, "ip link add dev %s type vxlan external gbp dstport 4789",
- VXLAN_TUNL_DEV1);
- SYS(fail, "ip link set dev %s address %s up", VXLAN_TUNL_DEV1, MAC_TUNL_DEV1);
+ SYS(fail, "ip link add dev %s address %s type vxlan external gbp dstport 4789",
+ VXLAN_TUNL_DEV1, MAC_TUNL_DEV1);
+ SYS(fail, "ip link set dev %s up", VXLAN_TUNL_DEV1);
SYS(fail, "ip addr add dev %s %s/24", VXLAN_TUNL_DEV1, IP4_ADDR_TUNL_DEV1);
SYS(fail, "ip neigh add %s lladdr %s dev %s",
IP4_ADDR_TUNL_DEV0, MAC_TUNL_DEV0, VXLAN_TUNL_DEV1);
@@ -198,11 +198,10 @@ static int add_ip6vxlan_tunnel(void)
IP6VXLAN_TUNL_DEV0, MAC_TUNL_DEV0);
/* root namespace */
- SYS(fail, "ip link add dev %s type vxlan external dstport 4789",
- IP6VXLAN_TUNL_DEV1);
- SYS(fail, "ip addr add dev %s %s/24", IP6VXLAN_TUNL_DEV1, IP4_ADDR_TUNL_DEV1);
- SYS(fail, "ip link set dev %s address %s up",
+ SYS(fail, "ip link add dev %s address %s type vxlan external dstport 4789",
IP6VXLAN_TUNL_DEV1, MAC_TUNL_DEV1);
+ SYS(fail, "ip addr add dev %s %s/24", IP6VXLAN_TUNL_DEV1, IP4_ADDR_TUNL_DEV1);
+ SYS(fail, "ip link set dev %s up", IP6VXLAN_TUNL_DEV1);
return 0;
fail:
---
base-commit: e1d84a37cba984388988d2f1ddc84561413f0db2
change-id: 20261009-selftests-bpf-tunnel-vxlan-mac-6beb8f462156
Best regards,
--
Qiliang Yuan <odys.yuan@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] selftests/bpf: Create the vxlan devices of test_tunnel with their MAC
2026-10-09 1:48 [PATCH bpf-next] selftests/bpf: Create the vxlan devices of test_tunnel with their MAC Qiliang Yuan
@ 2026-10-15 16:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-10-15 16:30 UTC (permalink / raw)
To: Qiliang Yuan
Cc: andrii, eddyz87, ihor.solodrai, ast, daniel, memxor, martin.lau,
song, yonghong.song, jolsa, emil, shuah, fankaixi.li, bpf,
linux-kselftest, linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Fri, 09 Oct 2026 09:48:44 +0800 you wrote:
> The vxlan tests of test_tunnel create a tunnel device in the initial
> netns with "ip link add", and then give it the MAC address that the
> static neighbor entry at the other end points to with "ip link set".
>
> systemd-udevd assigns new devices of the initial netns a MAC address of
> its own, following its MACAddressPolicy, when it handles their uevent.
> When it gets to that after the test set the address, the replies sent
> to the configured MAC are dropped as meant for another host, and the
> ping of vxlan_tunnel fails after 10 seconds.
>
> [...]
Here is the summary with links:
- [bpf-next] selftests/bpf: Create the vxlan devices of test_tunnel with their MAC
https://git.kernel.org/bpf/bpf-next/c/33cbc5c2cadf
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-15 16:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-09 1:48 [PATCH bpf-next] selftests/bpf: Create the vxlan devices of test_tunnel with their MAC Qiliang Yuan
2026-10-15 16:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®