]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add generic support for update and delete batch ops
authorBrian Vazquez <brianvv@google.com>
Wed, 15 Jan 2020 18:43:02 +0000 (10:43 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 15 Jan 2020 22:00:35 +0000 (14:00 -0800)
commit14c94bcd0a1996208b6c8fee07b3a25ab2e48f2d
treee0d3aa9f1a5e91fc6c9968f961c27a595ae5c4b0
parent25d6c96219f2fc546df26970d0d1b02aaffb1f38
bpf: Add generic support for update and delete batch ops

This commit adds generic support for update and delete batch ops that
can be used for almost all the bpf maps. These commands share the same
UAPI attr that lookup and lookup_and_delete batch ops use and the
syscall commands are:

  BPF_MAP_UPDATE_BATCH
  BPF_MAP_DELETE_BATCH

The main difference between update/delete and lookup batch ops is that
for update/delete keys/values must be specified for userspace and
because of that, neither in_batch nor out_batch are used.

Suggested-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Brian Vazquez <brianvv@google.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200115184308.162644-4-brianvv@google.com
include/linux/bpf.h
include/uapi/linux/bpf.h
kernel/bpf/syscall.c