aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/linux/bpf.h')
-rw-r--r--include/uapi/linux/bpf.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 762f74bc6c47..cb2b9f95160a 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -92,6 +92,7 @@ enum bpf_cmd {
92 BPF_PROG_GET_FD_BY_ID, 92 BPF_PROG_GET_FD_BY_ID,
93 BPF_MAP_GET_FD_BY_ID, 93 BPF_MAP_GET_FD_BY_ID,
94 BPF_OBJ_GET_INFO_BY_FD, 94 BPF_OBJ_GET_INFO_BY_FD,
95 BPF_PROG_QUERY,
95}; 96};
96 97
97enum bpf_map_type { 98enum bpf_map_type {
@@ -211,6 +212,9 @@ enum bpf_attach_type {
211/* Specify numa node during map creation */ 212/* Specify numa node during map creation */
212#define BPF_F_NUMA_NODE (1U << 2) 213#define BPF_F_NUMA_NODE (1U << 2)
213 214
215/* flags for BPF_PROG_QUERY */
216#define BPF_F_QUERY_EFFECTIVE (1U << 0)
217
214#define BPF_OBJ_NAME_LEN 16U 218#define BPF_OBJ_NAME_LEN 16U
215 219
216union bpf_attr { 220union bpf_attr {
@@ -289,6 +293,15 @@ union bpf_attr {
289 __u32 info_len; 293 __u32 info_len;
290 __aligned_u64 info; 294 __aligned_u64 info;
291 } info; 295 } info;
296
297 struct { /* anonymous struct used by BPF_PROG_QUERY command */
298 __u32 target_fd; /* container object to query */
299 __u32 attach_type;
300 __u32 query_flags;
301 __u32 attach_flags;
302 __aligned_u64 prog_ids;
303 __u32 prog_cnt;
304 } query;
292} __attribute__((aligned(8))); 305} __attribute__((aligned(8)));
293 306
294/* BPF helper function descriptions: 307/* BPF helper function descriptions: