summaryrefslogtreecommitdiffstats
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
authorAlexei Starovoitov2014-11-14 02:36:49 +0100
committerDavid S. Miller2014-11-18 19:44:00 +0100
commitd0003ec01c667b731c139e23de3306a8b328ccf5 (patch)
treea0156f2487c49537507d46f730c9e9ca9c4667c4 /include/linux/bpf.h
parentbpf: add a testsuite for eBPF maps (diff)
downloadkernel-qcow2-linux-d0003ec01c667b731c139e23de3306a8b328ccf5.tar.gz
kernel-qcow2-linux-d0003ec01c667b731c139e23de3306a8b328ccf5.tar.xz
kernel-qcow2-linux-d0003ec01c667b731c139e23de3306a8b328ccf5.zip
bpf: allow eBPF programs to use maps
expose bpf_map_lookup_elem(), bpf_map_update_elem(), bpf_map_delete_elem() map accessors to eBPF programs Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r--include/linux/bpf.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 51e9242e4803..75e94eaa228b 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -133,4 +133,9 @@ struct bpf_prog *bpf_prog_get(u32 ufd);
/* verify correctness of eBPF program */
int bpf_check(struct bpf_prog *fp, union bpf_attr *attr);
+/* verifier prototypes for helper functions called from eBPF programs */
+extern struct bpf_func_proto bpf_map_lookup_elem_proto;
+extern struct bpf_func_proto bpf_map_update_elem_proto;
+extern struct bpf_func_proto bpf_map_delete_elem_proto;
+
#endif /* _LINUX_BPF_H */