]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: Add tc helpers
authorAlexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Mon, 27 Oct 2025 14:51:53 +0000 (15:51 +0100)
committerMartin KaFai Lau <martin.lau@kernel.org>
Wed, 29 Oct 2025 18:07:24 +0000 (11:07 -0700)
commit1d5137c8d1ace4b85c458b5efe524c83d2f2ef72
tree1ad911ac8304271f5abc5cb1e030431e45479a63
parent54c134f379ee2816f60130d44e0e386c261dff45
selftests/bpf: Add tc helpers

The test_tunnel.c file defines small fonctions to easily attach eBPF
programs to tc hooks, either on egress, ingress or both.

Create a shared helper in network_helpers.c so that other tests can
benefit from it.

Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20251027-tc_tunnel-v3-1-505c12019f9d@bootlin.com
tools/testing/selftests/bpf/network_helpers.c
tools/testing/selftests/bpf/network_helpers.h
tools/testing/selftests/bpf/prog_tests/test_tunnel.c