Skip to content

Commit c60f2d2

Browse files
Brian VazquezAlexei Starovoitov
authored andcommitted
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 <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent aa2e93b commit c60f2d2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/bpf/arraymap.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,8 @@ const struct bpf_map_ops array_map_ops = {
503503
.map_mmap = array_map_mmap,
504504
.map_seq_show_elem = array_map_seq_show_elem,
505505
.map_check_btf = array_map_check_btf,
506+
.map_lookup_batch = generic_map_lookup_batch,
507+
.map_update_batch = generic_map_update_batch,
506508
};
507509

508510
const struct bpf_map_ops percpu_array_map_ops = {

0 commit comments

Comments
 (0)