]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: add ipv4 and dual ipv4/ipv6 support in btf_skc_cls_ingress
authorAlexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Sun, 20 Oct 2024 19:22:56 +0000 (21:22 +0200)
committerMartin KaFai Lau <martin.lau@kernel.org>
Mon, 21 Oct 2024 20:18:31 +0000 (13:18 -0700)
commit8a5cd986023547b3499072e17ff1ddae2c7c66a4
tree5cfd94bea2bd404fe2bad88bde99b194b2112992
parent0da0a75cf649e1e5a688af1763653206260f17a9
selftests/bpf: add ipv4 and dual ipv4/ipv6 support in btf_skc_cls_ingress

btf_skc_cls_ingress test currently checks that syncookie and
bpf_sk_assign/release helpers behave correctly in multiple scenarios,
but only with ipv6 socket.

Increase those helpers coverage by adding testing support for IPv4
sockets and IPv4/IPv6 sockets. The rework is mostly based on features
brought earlier in test_tcp_check_syncookie.sh to cover some fixes
performed on those helpers, but test_tcp_check_syncookie.sh is not
integrated in test_progs. The most notable changes linked to this are:
- some rework in the corresponding eBPF program to support both types of
  traffic
- the switch from start_server to start_server_str to allow to check
  some socket options
- the introduction of new subtests for ipv4 and ipv4/ipv6

Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Link: https://lore.kernel.org/r/20241020-syncookie-v2-4-2db240225fed@bootlin.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c
tools/testing/selftests/bpf/progs/test_btf_skc_cls_ingress.c