aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorBrian Vazquez <brianvv@google.com>2020-01-15 10:43:02 -0800
committerAlexei Starovoitov <ast@kernel.org>2020-01-15 14:00:35 -0800
commitaa2e93b8e58e18442edfb2427446732415bc215e (patch)
treee0d3aa9f1a5e91fc6c9968f961c27a595ae5c4b0 /include/uapi/linux/bpf.h
parentbpf: Add generic support for lookup batch op (diff)
downloadwireguard-linux-aa2e93b8e58e18442edfb2427446732415bc215e.tar.xz
wireguard-linux-aa2e93b8e58e18442edfb2427446732415bc215e.zip
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
Diffstat (limited to 'include/uapi/linux/bpf.h')
-rw-r--r--include/uapi/linux/bpf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 0721b2c6bb8c..d5320b0be459 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -108,6 +108,8 @@ enum bpf_cmd {
BPF_MAP_FREEZE,
BPF_BTF_GET_NEXT_ID,
BPF_MAP_LOOKUP_BATCH,
+ BPF_MAP_UPDATE_BATCH,
+ BPF_MAP_DELETE_BATCH,
};
enum bpf_map_type {