aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/arraymap.c
diff options
context:
space:
mode:
authorBrian Vazquez <brianvv@google.com>2020-01-15 10:43:03 -0800
committerAlexei Starovoitov <ast@kernel.org>2020-01-15 14:00:35 -0800
commitc60f2d2861778de6370a4f4ca6ab1d7d4a32efae (patch)
tree287e79cef52c774db1fa125a56620d2931e45889 /kernel/bpf/arraymap.c
parentbpf: Add generic support for update and delete batch ops (diff)
downloadlinux-dev-c60f2d2861778de6370a4f4ca6ab1d7d4a32efae.tar.xz
linux-dev-c60f2d2861778de6370a4f4ca6ab1d7d4a32efae.zip
bpf: Add lookup and update batch ops to arraymap
This adds the generic batch ops functionality to bpf arraymap, note that since deletion is not a valid operation for arraymap, only batch and lookup are added. Signed-off-by: Brian Vazquez <brianvv@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20200115184308.162644-5-brianvv@google.com
Diffstat (limited to 'kernel/bpf/arraymap.c')
-rw-r--r--kernel/bpf/arraymap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
index f0d19bbb9211..95d77770353c 100644
--- a/kernel/bpf/arraymap.c
+++ b/kernel/bpf/arraymap.c
@@ -503,6 +503,8 @@ const struct bpf_map_ops array_map_ops = {
.map_mmap = array_map_mmap,
.map_seq_show_elem = array_map_seq_show_elem,
.map_check_btf = array_map_check_btf,
+ .map_lookup_batch = generic_map_lookup_batch,
+ .map_update_batch = generic_map_update_batch,
};
const struct bpf_map_ops percpu_array_map_ops = {