selftests/bpf: add xfrm_info tests
authorEyal Birger <eyal.birger@gmail.com>
Sat, 3 Dec 2022 08:46:59 +0000 (10:46 +0200)
committerMartin KaFai Lau <martin.lau@kernel.org>
Tue, 6 Dec 2022 06:54:23 +0000 (22:54 -0800)
commit90a3a05eb33ff7a263f1e93e444d40e427cddf1a
tree9feeda0db56e1a151890140d5e5e558d36e6e169
parent4f4ac4d9106efeec9c84469725c04c4237c7fb6c
selftests/bpf: add xfrm_info tests

Test the xfrm_info kfunc helpers.

The test setup creates three name spaces - NS0, NS1, NS2.

XFRM tunnels are setup between NS0 and the two other NSs.

The kfunc helpers are used to steer traffic from NS0 to the other
NSs based on a userspace populated bpf global variable and validate
that the return traffic had arrived from the desired NS.

Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
Link: https://lore.kernel.org/r/20221203084659.1837829-5-eyal.birger@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/DENYLIST.s390x
tools/testing/selftests/bpf/config
tools/testing/selftests/bpf/prog_tests/xfrm_info.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/bpf_tracing_net.h
tools/testing/selftests/bpf/progs/xfrm_info.c [new file with mode: 0644]