diff options
Diffstat (limited to 'tools/include/uapi/linux')
| -rw-r--r-- | tools/include/uapi/linux/bpf.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index e43491ac4823..6d2137b4cf38 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h | |||
| @@ -175,6 +175,8 @@ enum bpf_attach_type { | |||
| 175 | /* Specify numa node during map creation */ | 175 | /* Specify numa node during map creation */ |
| 176 | #define BPF_F_NUMA_NODE (1U << 2) | 176 | #define BPF_F_NUMA_NODE (1U << 2) |
| 177 | 177 | ||
| 178 | #define BPF_OBJ_NAME_LEN 16U | ||
| 179 | |||
| 178 | union bpf_attr { | 180 | union bpf_attr { |
| 179 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ | 181 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ |
| 180 | __u32 map_type; /* one of enum bpf_map_type */ | 182 | __u32 map_type; /* one of enum bpf_map_type */ |
| @@ -188,6 +190,7 @@ union bpf_attr { | |||
| 188 | __u32 numa_node; /* numa node (effective only if | 190 | __u32 numa_node; /* numa node (effective only if |
| 189 | * BPF_F_NUMA_NODE is set). | 191 | * BPF_F_NUMA_NODE is set). |
| 190 | */ | 192 | */ |
| 193 | __u8 map_name[BPF_OBJ_NAME_LEN]; | ||
| 191 | }; | 194 | }; |
| 192 | 195 | ||
| 193 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ | 196 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ |
| @@ -210,6 +213,7 @@ union bpf_attr { | |||
| 210 | __aligned_u64 log_buf; /* user supplied buffer */ | 213 | __aligned_u64 log_buf; /* user supplied buffer */ |
| 211 | __u32 kern_version; /* checked when prog_type=kprobe */ | 214 | __u32 kern_version; /* checked when prog_type=kprobe */ |
| 212 | __u32 prog_flags; | 215 | __u32 prog_flags; |
| 216 | __u8 prog_name[BPF_OBJ_NAME_LEN]; | ||
| 213 | }; | 217 | }; |
| 214 | 218 | ||
| 215 | struct { /* anonymous struct used by BPF_OBJ_* commands */ | 219 | struct { /* anonymous struct used by BPF_OBJ_* commands */ |
| @@ -812,6 +816,11 @@ struct bpf_prog_info { | |||
| 812 | __u32 xlated_prog_len; | 816 | __u32 xlated_prog_len; |
| 813 | __aligned_u64 jited_prog_insns; | 817 | __aligned_u64 jited_prog_insns; |
| 814 | __aligned_u64 xlated_prog_insns; | 818 | __aligned_u64 xlated_prog_insns; |
| 819 | __u64 load_time; /* ns since boottime */ | ||
| 820 | __u32 created_by_uid; | ||
| 821 | __u32 nr_map_ids; | ||
| 822 | __aligned_u64 map_ids; | ||
| 823 | __u8 name[BPF_OBJ_NAME_LEN]; | ||
| 815 | } __attribute__((aligned(8))); | 824 | } __attribute__((aligned(8))); |
| 816 | 825 | ||
| 817 | struct bpf_map_info { | 826 | struct bpf_map_info { |
| @@ -821,6 +830,7 @@ struct bpf_map_info { | |||
| 821 | __u32 value_size; | 830 | __u32 value_size; |
| 822 | __u32 max_entries; | 831 | __u32 max_entries; |
| 823 | __u32 map_flags; | 832 | __u32 map_flags; |
| 833 | __u8 name[BPF_OBJ_NAME_LEN]; | ||
| 824 | } __attribute__((aligned(8))); | 834 | } __attribute__((aligned(8))); |
| 825 | 835 | ||
| 826 | /* User bpf_sock_ops struct to access socket values and specify request ops | 836 | /* User bpf_sock_ops struct to access socket values and specify request ops |
