diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2023-01-28 01:06:22 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-01-28 12:29:41 -0800 |
commit | 8fb9fb2f1728a56a2a6dba79de6f17975def658d (patch) | |
tree | 0d5e256420bfbde3757130f7b96e481290d2ba4f /tools/testing/selftests/bpf/test_progs.h | |
parent | 390a07a921b3b1fe544cb2921de7abb94ebb7f26 (diff) |
selftests/bpf: Query BPF_MAX_TRAMP_LINKS using BTF
Do not hard-code the value, since for s390x it will be smaller than
for x86.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20230128000650.1516334-4-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/test_progs.h')
-rw-r--r-- | tools/testing/selftests/bpf/test_progs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_progs.h b/tools/testing/selftests/bpf/test_progs.h index 3f058dfadbaf..d5d51ec97ec8 100644 --- a/tools/testing/selftests/bpf/test_progs.h +++ b/tools/testing/selftests/bpf/test_progs.h @@ -394,6 +394,8 @@ int kern_sync_rcu(void); int trigger_module_test_read(int read_sz); int trigger_module_test_write(int write_sz); int write_sysctl(const char *sysctl, const char *value); +int get_bpf_max_tramp_links_from(struct btf *btf); +int get_bpf_max_tramp_links(void); #ifdef __x86_64__ #define SYS_NANOSLEEP_KPROBE_NAME "__x64_sys_nanosleep" |