diff options
author | Alexei Starovoitov <ast@kernel.org> | 2018-10-21 09:13:33 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-10-21 09:13:33 +0300 |
commit | 76b5e30397ebe9f9dd58511d32945018f8196be9 (patch) | |
tree | ee60aebfc20747a4df2532951263c3f64858f802 /tools/bpf/bpftool | |
parent | 2576b96757e481fb40f097517763ccf75f935037 (diff) | |
parent | 3dca21156b5f809510e8c3efe7f1046e27242e3d (diff) | |
download | linux-76b5e30397ebe9f9dd58511d32945018f8196be9.tar.xz |
Merge branch 'misc-improvements'
Daniel Borkmann says:
====================
Last batch of misc patches I had in queue: first one removes some left-over
bits from ULP, second is a fix in the verifier where we wrongly use register
number as type to fetch the string for the dump, third disables xadd on flow
keys and subsequent one removes the flow key type from check_helper_mem_access()
as they cannot be passed into any helper as of today. Next one lets map push,
pop, peek avoid having to go through retpoline, and last one has a couple of
minor fixes and cleanups for the ring buffer walk.
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf/bpftool')
-rw-r--r-- | tools/bpf/bpftool/map_perf_ring.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/bpf/bpftool/map_perf_ring.c b/tools/bpf/bpftool/map_perf_ring.c index 6d41323be291..bdaf4062e26e 100644 --- a/tools/bpf/bpftool/map_perf_ring.c +++ b/tools/bpf/bpftool/map_perf_ring.c @@ -50,15 +50,17 @@ static void int_exit(int signo) stop = true; } -static enum bpf_perf_event_ret print_bpf_output(void *event, void *priv) +static enum bpf_perf_event_ret +print_bpf_output(struct perf_event_header *event, void *private_data) { - struct event_ring_info *ring = priv; - struct perf_event_sample *e = event; + struct perf_event_sample *e = container_of(event, struct perf_event_sample, + header); + struct event_ring_info *ring = private_data; struct { struct perf_event_header header; __u64 id; __u64 lost; - } *lost = event; + } *lost = (typeof(lost))event; if (json_output) { jsonw_start_object(json_wtr); |