selftests/bpf: Test struct_ops maps with a large number of struct_ops program.
authorKui-Feng Lee <thinker.li@gmail.com>
Sat, 24 Feb 2024 22:34:18 +0000 (14:34 -0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Mon, 4 Mar 2024 22:09:24 +0000 (14:09 -0800)
commit93bc28d859e57f1a654d3b63600d14c85c5630a4
treec3e977ac6a70cf40b315f9d84c42ad51b5d35799
parent187e2af05abe6bf80581490239c449456627d17a
selftests/bpf: Test struct_ops maps with a large number of struct_ops program.

Create and load a struct_ops map with a large number of struct_ops
programs to generate trampolines taking a size over multiple pages. The
map includes 40 programs. Their trampolines takes 6.6k+, more than 1.5
pages, on x86.

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20240224223418.526631-4-thinker.li@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.h
tools/testing/selftests/bpf/prog_tests/test_struct_ops_multi_pages.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/struct_ops_multi_pages.c [new file with mode: 0644]