aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/core.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2018-05-04 17:41:05 -0400
committerDaniel Borkmann <daniel@iogearbox.net>2018-05-04 17:41:06 -0400
commita5458aa923be8960a78d6fdfa1c6ff769b34deb2 (patch)
tree1e14a76c6a39662d602bf9589a31245ca9d74cdd /kernel/bpf/core.c
parentc27638c0628a5507e421f325dae3d3c9a45f227e (diff)
parentab7f5bf0928be2f148d000a6eaa6c0a36e74750e (diff)
Merge branch 'bpf-event-output-offload'
Jakub Kicinski says: ==================== This series centres on NFP offload of bpf_event_output(). The first patch allows perf event arrays to be used by offloaded programs. Next patch makes the nfp driver keep track of such arrays to be able to filter FW events referring to maps. Perf event arrays are not device bound. Having driver reimplement and manage the perf array seems brittle and unnecessary. Patch 4 moves slightly the verifier step which replaces map fds with map pointers. This is useful for nfp JIT since we can then easily replace host pointers with NFP table ids (patch 6). This allows us to lift the limitation on map helpers having to be used with the same map pointer on all paths. Second use of replacing fds with real host map pointers is that we can use the host map pointer as a key for FW events in perf event array offload. Patch 5 adds perf event output offload support for the NFP. There are some differences between bpf_event_output() offloaded and non-offloaded version. The FW messages which carry events may get dropped and reordered relatively easily. The return codes from the helper are also not guaranteed to match the host. Users are warned about some of those discrepancies with a one time warning message to kernel logs. bpftool gains an ability to dump perf ring events in a very simple format. This was very useful for testing and simple debug, maybe it will be useful to others? Last patch is a trivial comment fix. ==================== Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'kernel/bpf/core.c')
-rw-r--r--kernel/bpf/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 1127552c8033..d0d7d9462368 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -1719,6 +1719,7 @@ bpf_event_output(struct bpf_map *map, u64 flags, void *meta, u64 meta_size,
1719{ 1719{
1720 return -ENOTSUPP; 1720 return -ENOTSUPP;
1721} 1721}
1722EXPORT_SYMBOL_GPL(bpf_event_output);
1722 1723
1723/* Always built-in helper functions. */ 1724/* Always built-in helper functions. */
1724const struct bpf_func_proto bpf_tail_call_proto = { 1725const struct bpf_func_proto bpf_tail_call_proto = {