summaryrefslogtreecommitdiffstats
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@plumgrid.com>2014-11-13 17:36:49 -0800
committerDavid S. Miller <davem@davemloft.net>2014-11-18 13:44:00 -0500
commitd0003ec01c667b731c139e23de3306a8b328ccf5 (patch)
treea0156f2487c49537507d46f730c9e9ca9c4667c4 /include/linux/bpf.h
parentffb65f27a15583379567b6a59a9758163b7f5750 (diff)
downloadop-kernel-dev-d0003ec01c667b731c139e23de3306a8b328ccf5.zip
op-kernel-dev-d0003ec01c667b731c139e23de3306a8b328ccf5.tar.gz
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 51e9242..75e94ea 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 */
OpenPOWER on IntegriCloud