From: Brian Vazquez Date: Wed, 15 Jan 2020 18:43:03 +0000 (-0800) Subject: bpf: Add lookup and update batch ops to arraymap X-Git-Tag: microblaze-v5.7-rc1~165^2~46^2~23^2~5 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=c60f2d2861778de6370a4f4ca6ab1d7d4a32efae;p=linux-2.6-microblaze.git 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 Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200115184308.162644-5-brianvv@google.com --- 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 = {