]> Gentwo Git Trees - linux/.git/commit
selftests/bpf: Move common TCP helpers into bpf_tracing_net.h
authorHoyeon Lee <hoyeon.lee@suse.com>
Sat, 15 Nov 2025 22:55:38 +0000 (07:55 +0900)
committerMartin KaFai Lau <martin.lau@kernel.org>
Tue, 18 Nov 2025 22:57:45 +0000 (14:57 -0800)
commitf700b37314d9b96dce66e31d2da865b201fa6b38
treefd098748f47531323c2560b8fb08a9e8023a67e2
parent7dc211c1159d991db609bdf4b0fb9033c04adcbc
selftests/bpf: Move common TCP helpers into bpf_tracing_net.h

Some BPF selftests contain identical copies of the min(), max(),
before(), and after() helpers. These repeated snippets are the same
across the tests and do not need to be defined separately.

Move these helpers into bpf_tracing_net.h so they can be shared by
TCP related BPF programs. This removes repeated code and keeps the
helpers in a single place.

Reviewed-by: Amery Hung <ameryhung@gmail.com>
Signed-off-by: Hoyeon Lee <hoyeon.lee@suse.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20251115225550.1086693-4-hoyeon.lee@suse.com
tools/testing/selftests/bpf/progs/bpf_cc_cubic.c
tools/testing/selftests/bpf/progs/bpf_cubic.c
tools/testing/selftests/bpf/progs/bpf_dctcp.c
tools/testing/selftests/bpf/progs/bpf_tracing_net.h
tools/testing/selftests/bpf/progs/tcp_ca_write_sk_pacing.c