summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYonghong Song <yonghong.song@linux.dev>2023-08-27 17:27:34 +0200
committerAlexei Starovoitov <ast@kernel.org>2023-09-08 17:42:17 +0200
commit41a5db8d8161457b121a03fde999ff6e00090ee2 (patch)
tree4474dade0ac40c98c45eff020a62cab62471f525 /include
parentlibbpf: Add basic BTF sanity validation (diff)
downloadlinux-41a5db8d8161457b121a03fde999ff6e00090ee2.tar.xz
linux-41a5db8d8161457b121a03fde999ff6e00090ee2.zip
bpf: Add support for non-fix-size percpu mem allocation
This is needed for later percpu mem allocation when the allocation is done by bpf program. For such cases, a global bpf_global_percpu_ma is added where a flexible allocation size is needed. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20230827152734.1995725-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/bpf.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 024e8b28c34b..440dd1f59a1c 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -55,8 +55,8 @@ struct cgroup;
extern struct idr btf_idr;
extern spinlock_t btf_idr_lock;
extern struct kobject *btf_kobj;
-extern struct bpf_mem_alloc bpf_global_ma;
-extern bool bpf_global_ma_set;
+extern struct bpf_mem_alloc bpf_global_ma, bpf_global_percpu_ma;
+extern bool bpf_global_ma_set, bpf_global_percpu_ma_set;
typedef u64 (*bpf_callback_t)(u64, u64, u64, u64, u64);
typedef int (*bpf_iter_init_seq_priv_t)(void *private_data,