sync uapi header include/uapi/linux/bpf.h to tools/include/uapi/linux/bpf.h. Signed-off-by: Yonghong Song <yhs@xxxxxx> --- 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