diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2023-01-28 01:06:21 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-01-28 21:27:12 +0100 |
commit | 390a07a921b3b1fe544cb2921de7abb94ebb7f26 (patch) | |
tree | 3c8cf54d9b05ed4c9ac41169408f5e6833b741be | |
parent | bpf: Use ARG_CONST_SIZE_OR_ZERO for 3rd argument of bpf_tcp_raw_gen_syncookie... (diff) | |
download | linux-390a07a921b3b1fe544cb2921de7abb94ebb7f26.tar.xz linux-390a07a921b3b1fe544cb2921de7abb94ebb7f26.zip |
bpf: Change BPF_MAX_TRAMP_LINKS to enum
This way it's possible to query its value from testcases using BTF.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20230128000650.1516334-3-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-rw-r--r-- | include/linux/bpf.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index f7f24defccb8..34551e4ebc72 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -939,7 +939,9 @@ struct btf_func_model { /* Each call __bpf_prog_enter + call bpf_func + call __bpf_prog_exit is ~50 * bytes on x86. */ -#define BPF_MAX_TRAMP_LINKS 38 +enum { + BPF_MAX_TRAMP_LINKS = 38, +}; struct bpf_tramp_links { struct bpf_tramp_link *links[BPF_MAX_TRAMP_LINKS]; |