]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/bpf: move ip checksum helper to network helpers
authorAlexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Wed, 20 Nov 2024 07:43:19 +0000 (08:43 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 2 Dec 2024 16:41:16 +0000 (08:41 -0800)
commitf4504af68575c1675235bacd8d36157cfc27ae5e
treec5522908af89363ad8c39b76e977740d75f2354e
parentc24010821a89954a93b39354c42596d315518c9b
selftests/bpf: move ip checksum helper to network helpers

xdp_metadata test has a small helper computing ipv4 checksums to allow
manually building packets.

Move this helper to network_helpers to share it with other tests.

Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-9-45b46494f937@bootlin.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/network_helpers.h
tools/testing/selftests/bpf/prog_tests/xdp_metadata.c