linux-stable/tools
Felix Maurer 1ba28cb692 selftests/bpf: Make test_lwt_ip_encap more stable and faster
[ Upstream commit d23a872032 ]

In test_lwt_ip_encap, the ingress IPv6 encap test failed from time to
time. The failure occured when an IPv4 ping through the IPv6 GRE
encapsulation did not receive a reply within the timeout. The IPv4 ping
and the IPv6 ping in the test used different timeouts (1 sec for IPv4
and 6 sec for IPv6), probably taking into account that IPv6 might need
longer to successfully complete. However, when IPv4 pings (with the
short timeout) are encapsulated into the IPv6 tunnel, the delays of IPv6
apply.

The actual reason for the long delays with IPv6 was that the IPv6
neighbor discovery sometimes did not complete in time. This was caused
by the outgoing interface only having a tentative link local address,
i.e., not having completed DAD for that lladdr. The ND was successfully
retried after 1 sec but that was too late for the ping timeout.

The IPv6 addresses for the test were already added with nodad. However,
for the lladdrs, DAD was still performed. We now disable DAD in the test
netns completely and just assume that the two lladdrs on each veth pair
do not collide. This removes all the delays for IPv6 traffic in the
test.

Without the delays, we can now also reduce the delay of the IPv6 ping to
1 sec. This makes the whole test complete faster because we don't need
to wait for the excessive timeout for each IPv6 ping that is supposed
to fail.

Fixes: 0fde56e438 ("selftests: bpf: add test_lwt_ip_encap selftest")
Signed-off-by: Felix Maurer <fmaurer@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/4987d549d48b4e316cd5b3936de69c8d4bc75a4f.1646305899.git.fmaurer@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:40:20 +02:00
..
accounting
arch x86/speculation: Rename RETPOLINE_AMD to RETPOLINE_LFENCE 2022-03-11 12:11:49 +01:00
bootconfig tools/bootconfig: Fix tracing_on option checking in ftrace2bconf.sh 2021-09-26 14:08:59 +02:00
bpf tools/resolve_btfids: Do not print any commands when building silently 2022-02-08 18:30:39 +01:00
build tools build: Remove needless libpython-version feature check that breaks test-all fast path 2021-12-14 11:32:42 +01:00
cgroup tools/cgroup/slabinfo.py: updated to work on current kernel 2021-05-07 11:04:31 +02:00
debugging
edid
firewire
firmware
gpio tools: gpio: fix %llu warning in gpio-watch.c 2021-01-27 11:55:20 +01:00
hv
iio
include tools/nolibc: fix incorrect truncation of exit code 2022-01-27 10:53:42 +01:00
io_uring
kvm/kvm_stat tools/kvm_stat: Add restart delay 2021-04-16 11:43:20 +02:00
laptop
leds
lib libbpf: Unmap rings when umem deleted 2022-04-08 14:40:20 +02:00
memory-model
objtool objtool: Fix static_call list generation 2021-11-18 14:04:02 +01:00
pci
pcmcia
perf perf symbols: Fix symbol size calculation condition 2022-03-23 09:13:29 +01:00
power tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
scripts tools: Allow proper CC/CXX/... override with LLVM=1 in Makefile.include 2021-07-31 08:16:10 +02:00
spi
testing selftests/bpf: Make test_lwt_ip_encap more stable and faster 2022-04-08 14:40:20 +02:00
thermal/tmon tools/thermal/tmon: Add cross compiling support 2021-09-18 13:40:07 +02:00
time
usb usb: testusb: Fix for showing the connection speed 2021-10-09 14:40:56 +02:00
virtio tools/virtio: fix virtio_test execution 2022-04-08 14:39:47 +02:00
vm tools/vm/page-types: remove dependency on opt_file for idle page tracking 2021-10-09 14:40:57 +02:00
wmi
Makefile