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, 8 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 48014a71f0fe..2887f3f9da59 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -9,6 +9,7 @@
9 9
10#include <uapi/linux/bpf.h> 10#include <uapi/linux/bpf.h>
11#include <linux/workqueue.h> 11#include <linux/workqueue.h>
12#include <linux/file.h>
12 13
13struct bpf_map; 14struct bpf_map;
14 15
@@ -17,6 +18,12 @@ struct bpf_map_ops {
17 /* funcs callable from userspace (via syscall) */ 18 /* funcs callable from userspace (via syscall) */
18 struct bpf_map *(*map_alloc)(union bpf_attr *attr); 19 struct bpf_map *(*map_alloc)(union bpf_attr *attr);
19 void (*map_free)(struct bpf_map *); 20 void (*map_free)(struct bpf_map *);
21 int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key);
22
23 /* funcs callable from userspace and from eBPF programs */
24 void *(*map_lookup_elem)(struct bpf_map *map, void *key);
25 int (*map_update_elem)(struct bpf_map *map, void *key, void *value);
26 int (*map_delete_elem)(struct bpf_map *map, void *key);
20}; 27};
21 28
22struct bpf_map { 29struct bpf_map {
@@ -37,5 +44,6 @@ struct bpf_map_type_list {
37 44
38void bpf_register_map_type(struct bpf_map_type_list *tl); 45void bpf_register_map_type(struct bpf_map_type_list *tl);
39void bpf_map_put(struct bpf_map *map); 46void bpf_map_put(struct bpf_map *map);
47struct bpf_map *bpf_map_get(struct fd f);
40 48
41#endif /* _LINUX_BPF_H */ 49#endif /* _LINUX_BPF_H */