aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r--include/linux/bpf.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 139d6d2e123f..d495211d63d1 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -24,6 +24,10 @@ struct bpf_map_ops {
24 void *(*map_lookup_elem)(struct bpf_map *map, void *key); 24 void *(*map_lookup_elem)(struct bpf_map *map, void *key);
25 int (*map_update_elem)(struct bpf_map *map, void *key, void *value, u64 flags); 25 int (*map_update_elem)(struct bpf_map *map, void *key, void *value, u64 flags);
26 int (*map_delete_elem)(struct bpf_map *map, void *key); 26 int (*map_delete_elem)(struct bpf_map *map, void *key);
27
28 /* funcs called by prog_array and perf_event_array map */
29 void *(*map_fd_get_ptr) (struct bpf_map *map, int fd);
30 void (*map_fd_put_ptr) (void *ptr);
27}; 31};
28 32
29struct bpf_map { 33struct bpf_map {
@@ -142,13 +146,13 @@ struct bpf_array {
142 bool owner_jited; 146 bool owner_jited;
143 union { 147 union {
144 char value[0] __aligned(8); 148 char value[0] __aligned(8);
145 struct bpf_prog *prog[0] __aligned(8); 149 void *ptrs[0] __aligned(8);
146 }; 150 };
147}; 151};
148#define MAX_TAIL_CALL_CNT 32 152#define MAX_TAIL_CALL_CNT 32
149 153
150u64 bpf_tail_call(u64 ctx, u64 r2, u64 index, u64 r4, u64 r5); 154u64 bpf_tail_call(u64 ctx, u64 r2, u64 index, u64 r4, u64 r5);
151void bpf_prog_array_map_clear(struct bpf_map *map); 155void bpf_fd_array_map_clear(struct bpf_map *map);
152bool bpf_prog_array_compatible(struct bpf_array *array, const struct bpf_prog *fp); 156bool bpf_prog_array_compatible(struct bpf_array *array, const struct bpf_prog *fp);
153const struct bpf_func_proto *bpf_get_trace_printk_proto(void); 157const struct bpf_func_proto *bpf_get_trace_printk_proto(void);
154 158