aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
authorDmitrii Banshchikov <me@ubique.spb.ru>2021-02-26 00:26:29 +0400
committerAlexei Starovoitov <ast@kernel.org>2021-02-26 11:59:53 -0800
commit523a4cf491b3c9e2d546040d57250f1a0ca84f03 (patch)
tree30081a18f353e9e02c2260759875d0fed7b8e9ac /include/linux/bpf.h
parentMerge branch 'bpf: enable task local storage for tracing' (diff)
downloadlinux-dev-523a4cf491b3c9e2d546040d57250f1a0ca84f03.tar.xz
linux-dev-523a4cf491b3c9e2d546040d57250f1a0ca84f03.zip
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.h5
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;