[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190829064509.2750871-1-yhs@fb.com>
Date: Wed, 28 Aug 2019 23:45:09 -0700
From: Yonghong Song <yhs@...com>
To: <bpf@...r.kernel.org>, <netdev@...r.kernel.org>
CC: Alexei Starovoitov <ast@...com>,
Brian Vazquez <brianvv@...gle.com>,
Daniel Borkmann <daniel@...earbox.net>, <kernel-team@...com>,
Yonghong Song <yhs@...com>
Subject: [PATCH bpf-next 06/13] 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@...com>
---
tools/include/uapi/linux/bpf.h | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 5d2fb183ee2d..576688f13e8c 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 {
@@ -347,6 +351,9 @@ enum bpf_attach_type {
/* flags for BPF_PROG_QUERY */
#define BPF_F_QUERY_EFFECTIVE (1U << 0)
+/* flags for BPF_MAP_*_BATCH */
+#define BPF_F_ENFORCE_ENOENT (1U << 0)
+
enum bpf_stack_build_id_status {
/* user space need an empty entry to identify end of a trace */
BPF_STACK_BUILD_ID_EMPTY = 0,
@@ -396,6 +403,26 @@ union bpf_attr {
__u64 flags;
};
+ struct { /* struct used by BPF_MAP_*_BATCH commands */
+ __aligned_u64 start_key; /* input: storing start key,
+ * if NULL, starting from the beginning.
+ */
+ __aligned_u64 next_start_key; /* output: storing next batch start_key,
+ * if NULL, no next key.
+ */
+ __aligned_u64 keys; /* input/output: key buffer */
+ __aligned_u64 values; /* input/output: value buffer */
+ __u32 count; /* input: # of keys/values in
+ * or fits in keys[]/values[].
+ * output: how many successful
+ * lookup/lookup_and_delete
+ * update/delete operations.
+ */
+ __u32 map_fd;
+ __u64 elem_flags; /* BPF_MAP_*_ELEM flags */
+ __u64 flags; /* flags for batch operation */
+ } batch;
+
struct { /* anonymous struct used by BPF_PROG_LOAD command */
__u32 prog_type; /* one of enum bpf_prog_type */
__u32 insn_cnt;
--
2.17.1
Powered by blists - more mailing lists