summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2020-01-15 10:43:05 -0800
committerAlexei Starovoitov <ast@kernel.org>2020-01-15 14:00:35 -0800
commita1e3a3b8ba2c381a043d0c4273837895c1d3cf9c (patch)
treeb276e047290d7b36959b6964398f243cd5700171 /tools
parent057996380a42bb64ccc04383cfa9c0ace4ea11f0 (diff)
downloadlinux-a1e3a3b8ba2c381a043d0c4273837895c1d3cf9c.tar.bz2
tools/bpf: Sync uapi header bpf.h
sync uapi header include/uapi/linux/bpf.h to tools/include/uapi/linux/bpf.h Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200115184308.162644-7-brianvv@google.com
Diffstat (limited to 'tools')
-rw-r--r--tools/include/uapi/linux/bpf.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index a88837d4dd18..033d90a2282d 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -107,6 +107,10 @@ enum bpf_cmd {
BPF_MAP_LOOKUP_AND_DELETE_ELEM,
BPF_MAP_FREEZE,
BPF_BTF_GET_NEXT_ID,
+ BPF_MAP_LOOKUP_BATCH,
+ BPF_MAP_LOOKUP_AND_DELETE_BATCH,
+ BPF_MAP_UPDATE_BATCH,
+ BPF_MAP_DELETE_BATCH,
};
enum bpf_map_type {
@@ -420,6 +424,23 @@ union bpf_attr {
__u64 flags;
};
+ struct { /* struct used by BPF_MAP_*_BATCH commands */
+ __aligned_u64 in_batch; /* start batch,
+ * NULL to start from beginning
+ */
+ __aligned_u64 out_batch; /* output: next start batch */
+ __aligned_u64 keys;
+ __aligned_u64 values;
+ __u32 count; /* input/output:
+ * input: # of key/value
+ * elements
+ * output: # of filled elements
+ */
+ __u32 map_fd;
+ __u64 elem_flags;
+ __u64 flags;
+ } batch;
+
struct { /* anonymous struct used by BPF_PROG_LOAD command */
__u32 prog_type; /* one of enum bpf_prog_type */
__u32 insn_cnt;