diff options
author | Alban Crequy <alban@kinvolk.io> | 2019-04-14 19:58:46 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-04-16 11:24:02 +0300 |
commit | 02a8c817a31606b6b37c2b755f6569903f44241e (patch) | |
tree | b81884c3fa3f440f79ba70d35cbc542fe7cc519f /drivers/media | |
parent | a5cb33464e53482ecc645b4b7703f5b6d151095f (diff) | |
download | linux-02a8c817a31606b6b37c2b755f6569903f44241e.tar.xz |
bpf: add map helper functions push, pop, peek in more BPF programs
commit f1a2e44a3aec ("bpf: add queue and stack maps") introduced new BPF
helper functions:
- BPF_FUNC_map_push_elem
- BPF_FUNC_map_pop_elem
- BPF_FUNC_map_peek_elem
but they were made available only for network BPF programs. This patch
makes them available for tracepoint, cgroup and lirc programs.
Signed-off-by: Alban Crequy <alban@kinvolk.io>
Cc: Mauricio Vasquez B <mauricio.vasquez@polito.it>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/rc/bpf-lirc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/rc/bpf-lirc.c b/drivers/media/rc/bpf-lirc.c index 390a722e6211..ee657003c1a1 100644 --- a/drivers/media/rc/bpf-lirc.c +++ b/drivers/media/rc/bpf-lirc.c @@ -97,6 +97,12 @@ lirc_mode2_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) return &bpf_map_update_elem_proto; case BPF_FUNC_map_delete_elem: return &bpf_map_delete_elem_proto; + case BPF_FUNC_map_push_elem: + return &bpf_map_push_elem_proto; + case BPF_FUNC_map_pop_elem: + return &bpf_map_pop_elem_proto; + case BPF_FUNC_map_peek_elem: + return &bpf_map_peek_elem_proto; case BPF_FUNC_ktime_get_ns: return &bpf_ktime_get_ns_proto; case BPF_FUNC_tail_call: |