bpf: offload: allow offloaded programs to use perf event arrays
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 4 May 2018 01:37:08 +0000 (18:37 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 4 May 2018 21:41:03 +0000 (23:41 +0200)
commit0cd3cbed3caf6eae3bc0fa4afa4f26a9babfe55a
tree6c85805d0e926386e47ebbe193ccd56dc1a94fa2
parentc27638c0628a5507e421f325dae3d3c9a45f227e
bpf: offload: allow offloaded programs to use perf event arrays

BPF_MAP_TYPE_PERF_EVENT_ARRAY is special as far as offload goes.
The map only holds glue to perf ring, not actual data.  Allow
non-offloaded perf event arrays to be used in offloaded programs.
Offload driver can extract the events from HW and put them in
the map for user space to retrieve.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/linux/bpf.h
kernel/bpf/offload.c