diff options
author | Dmitrii Banshchikov <me@ubique.spb.ru> | 2021-02-25 23:26:29 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-02-26 22:59:53 +0300 |
commit | 523a4cf491b3c9e2d546040d57250f1a0ca84f03 (patch) | |
tree | 30081a18f353e9e02c2260759875d0fed7b8e9ac /include/linux/bpf.h | |
parent | a7d24d9582f8cc24fabd11c458950ac94710566a (diff) | |
download | linux-523a4cf491b3c9e2d546040d57250f1a0ca84f03.tar.xz |
bpf: Use MAX_BPF_FUNC_REG_ARGS macro
Instead of using integer literal here and there use macro name for
better context.
Signed-off-by: Dmitrii Banshchikov <me@ubique.spb.ru>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20210225202629.585485-1-me@ubique.spb.ru
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r-- | include/linux/bpf.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index e2cfc4809219..ae2c35641619 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -506,6 +506,11 @@ enum bpf_cgroup_storage_type { */ #define MAX_BPF_FUNC_ARGS 12 +/* The maximum number of arguments passed through registers + * a single function may have. + */ +#define MAX_BPF_FUNC_REG_ARGS 5 + struct btf_func_model { u8 ret_size; u8 nr_args; |