summaryrefslogtreecommitdiffstats
path: root/tools/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorMartin KaFai Lau2018-04-19 00:56:04 +0200
committerDaniel Borkmann2018-04-19 21:46:25 +0200
commit3bd86a8409fc5a87ea415087b0c30ab42818e7c8 (patch)
tree53edfaaac3ed458738bb22052a8d175f4998bb43 /tools/include/uapi/linux/bpf.h
parentbpf: btf: Add pretty print support to the basic arraymap (diff)
downloadkernel-qcow2-linux-3bd86a8409fc5a87ea415087b0c30ab42818e7c8.tar.gz
kernel-qcow2-linux-3bd86a8409fc5a87ea415087b0c30ab42818e7c8.tar.xz
kernel-qcow2-linux-3bd86a8409fc5a87ea415087b0c30ab42818e7c8.zip
bpf: btf: Sync bpf.h and btf.h to tools/
This patch sync up the bpf.h and btf.h to tools/ Signed-off-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Alexei Starovoitov <ast@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/include/uapi/linux/bpf.h')
-rw-r--r--tools/include/uapi/linux/bpf.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 56bf493ba7ed..7f7fbb9d0253 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -95,6 +95,7 @@ enum bpf_cmd {
BPF_OBJ_GET_INFO_BY_FD,
BPF_PROG_QUERY,
BPF_RAW_TRACEPOINT_OPEN,
+ BPF_BTF_LOAD,
};
enum bpf_map_type {
@@ -279,6 +280,9 @@ union bpf_attr {
*/
char map_name[BPF_OBJ_NAME_LEN];
__u32 map_ifindex; /* ifindex of netdev to create on */
+ __u32 btf_fd; /* fd pointing to a BTF type data */
+ __u32 btf_key_id; /* BTF type_id of the key */
+ __u32 btf_value_id; /* BTF type_id of the value */
};
struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
@@ -363,6 +367,14 @@ union bpf_attr {
__u64 name;
__u32 prog_fd;
} raw_tracepoint;
+
+ struct { /* anonymous struct for BPF_BTF_LOAD */
+ __aligned_u64 btf;
+ __aligned_u64 btf_log_buf;
+ __u32 btf_size;
+ __u32 btf_log_size;
+ __u32 btf_log_level;
+ };
} __attribute__((aligned(8)));
/* BPF helper function descriptions: