diff options
Diffstat (limited to 'include/uapi/linux/bpf.h')
-rw-r--r-- | include/uapi/linux/bpf.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 9a2d1a04eb24..c8383a289f7b 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
@@ -95,6 +95,7 @@ enum bpf_cmd { | |||
95 | BPF_OBJ_GET_INFO_BY_FD, | 95 | BPF_OBJ_GET_INFO_BY_FD, |
96 | BPF_PROG_QUERY, | 96 | BPF_PROG_QUERY, |
97 | BPF_RAW_TRACEPOINT_OPEN, | 97 | BPF_RAW_TRACEPOINT_OPEN, |
98 | BPF_BTF_LOAD, | ||
98 | }; | 99 | }; |
99 | 100 | ||
100 | enum bpf_map_type { | 101 | enum bpf_map_type { |
@@ -279,6 +280,9 @@ union bpf_attr { | |||
279 | */ | 280 | */ |
280 | char map_name[BPF_OBJ_NAME_LEN]; | 281 | char map_name[BPF_OBJ_NAME_LEN]; |
281 | __u32 map_ifindex; /* ifindex of netdev to create on */ | 282 | __u32 map_ifindex; /* ifindex of netdev to create on */ |
283 | __u32 btf_fd; /* fd pointing to a BTF type data */ | ||
284 | __u32 btf_key_id; /* BTF type_id of the key */ | ||
285 | __u32 btf_value_id; /* BTF type_id of the value */ | ||
282 | }; | 286 | }; |
283 | 287 | ||
284 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ | 288 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ |
@@ -363,6 +367,14 @@ union bpf_attr { | |||
363 | __u64 name; | 367 | __u64 name; |
364 | __u32 prog_fd; | 368 | __u32 prog_fd; |
365 | } raw_tracepoint; | 369 | } raw_tracepoint; |
370 | |||
371 | struct { /* anonymous struct for BPF_BTF_LOAD */ | ||
372 | __aligned_u64 btf; | ||
373 | __aligned_u64 btf_log_buf; | ||
374 | __u32 btf_size; | ||
375 | __u32 btf_log_size; | ||
376 | __u32 btf_log_level; | ||
377 | }; | ||
366 | } __attribute__((aligned(8))); | 378 | } __attribute__((aligned(8))); |
367 | 379 | ||
368 | /* BPF helper function descriptions: | 380 | /* BPF helper function descriptions: |