summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller2015-03-16 02:57:30 +0100
committerDavid S. Miller2015-03-16 02:57:30 +0100
commita498cfe990f569dd3766bfc9bfd2a5ee04468cd2 (patch)
treeef0c4dc4642696d84bd56c4f409dd32507981bb0 /include
parentMerge branch 'gianfar-next' (diff)
parentebpf: add helper for obtaining current processor id (diff)
downloadkernel-qcow2-linux-a498cfe990f569dd3766bfc9bfd2a5ee04468cd2.tar.gz
kernel-qcow2-linux-a498cfe990f569dd3766bfc9bfd2a5ee04468cd2.tar.xz
kernel-qcow2-linux-a498cfe990f569dd3766bfc9bfd2a5ee04468cd2.zip
Merge branch 'ebpf_helpers'
Daniel Borkmann says: ==================== eBPF updates Two small eBPF helper additions to better match up with ancillary classic BPF functionality. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/bpf.h3
-rw-r--r--include/uapi/linux/bpf.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 80f2e0fc3d02..30bfd331882a 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -154,4 +154,7 @@ extern const struct bpf_func_proto bpf_map_lookup_elem_proto;
extern const struct bpf_func_proto bpf_map_update_elem_proto;
extern const struct bpf_func_proto bpf_map_delete_elem_proto;
+extern const struct bpf_func_proto bpf_get_prandom_u32_proto;
+extern const struct bpf_func_proto bpf_get_smp_processor_id_proto;
+
#endif /* _LINUX_BPF_H */
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 3fa1af8a58d7..de1f63668daf 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -165,6 +165,8 @@ enum bpf_func_id {
BPF_FUNC_map_lookup_elem, /* void *map_lookup_elem(&map, &key) */
BPF_FUNC_map_update_elem, /* int map_update_elem(&map, &key, &value, flags) */
BPF_FUNC_map_delete_elem, /* int map_delete_elem(&map, &key) */
+ BPF_FUNC_get_prandom_u32, /* u32 prandom_u32(void) */
+ BPF_FUNC_get_smp_processor_id, /* u32 raw_smp_processor_id(void) */
__BPF_FUNC_MAX_ID,
};