summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/core.c
diff options
context:
space:
mode:
authorFeng Zhou <zhoufeng.zf@bytedance.com>2022-05-11 17:38:53 +0800
committerAlexei Starovoitov <ast@kernel.org>2022-05-11 18:16:54 -0700
commit07343110b293456d30393e89b86c4dee1ac051c8 (patch)
tree61054fae2b7d0c6ea163a0eeaf272501f1ba470f /kernel/bpf/core.c
parent571b8739dd6df6d41bdcc83ed50b481a27af912c (diff)
downloadlinux-stable-07343110b293456d30393e89b86c4dee1ac051c8.tar.gz
linux-stable-07343110b293456d30393e89b86c4dee1ac051c8.tar.bz2
linux-stable-07343110b293456d30393e89b86c4dee1ac051c8.zip
bpf: add bpf_map_lookup_percpu_elem for percpu map
Add new ebpf helpers bpf_map_lookup_percpu_elem. The implementation method is relatively simple, refer to the implementation method of map_lookup_elem of percpu map, increase the parameters of cpu, and obtain it according to the specified cpu. Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com> Link: https://lore.kernel.org/r/20220511093854.411-2-zhoufeng.zf@bytedance.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/core.c')
-rw-r--r--kernel/bpf/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 13e9dbeeedf3..76f68d0a7ae8 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -2619,6 +2619,7 @@ const struct bpf_func_proto bpf_map_delete_elem_proto __weak;
const struct bpf_func_proto bpf_map_push_elem_proto __weak;
const struct bpf_func_proto bpf_map_pop_elem_proto __weak;
const struct bpf_func_proto bpf_map_peek_elem_proto __weak;
+const struct bpf_func_proto bpf_map_lookup_percpu_elem_proto __weak;
const struct bpf_func_proto bpf_spin_lock_proto __weak;
const struct bpf_func_proto bpf_spin_unlock_proto __weak;
const struct bpf_func_proto bpf_jiffies64_proto __weak;