Skip to contentSkip to conversation

samples/bpf: fix bpf_perf_event_output prototype

PATCH Applied Alexei Starovoitov 2 participants 2 messages Aug 10, 2016 – Aug 11, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 samples/bpf: fix bpf_perf_event_output prototype

From: Adam Barth <[email protected]>

The commit 555c8a8623a3 ("bpf: avoid stack copy and use skb ctx for event output") started using 20 of initially reserved upper 32-bits of 'flags' argument in bpf_perf_event_output(). Adjust corresponding prototype in samples/bpf/bpf_helpers.h

---
 samples/bpf/bpf_helpers.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
samples/bpf/bpf_helpers.h +3 -1
index 217c8d507f2e..cbc52df165b4 100644
@@ -37,7 +37,9 @@ static int (*bpf_clone_redirect)(void *ctx, int ifindex, int flags) =
 	(void *) BPF_FUNC_clone_redirect;
 static int (*bpf_redirect)(int ifindex, int flags) =
 	(void *) BPF_FUNC_redirect;
-static int (*bpf_perf_event_output)(void *ctx, void *map, int index, void *data, int size) =
+static int (*bpf_perf_event_output)(void *ctx, void *map,
+				    unsigned long long flags, void *data,
+				    int size) =
 	(void *) BPF_FUNC_perf_event_output;
 static int (*bpf_get_stackid)(void *ctx, void *map, int flags) =
 	(void *) BPF_FUNC_get_stackid;
Signature · 1 line
2.8.0
maintainer Applied
#1 lore raw

From: Alexei Starovoitov <[email protected]>
Date: Wed, 10 Aug 2016 09:45:39 -0700

Quoted 9 lines

From: Adam Barth <[email protected]>

The commit 555c8a8623a3 ("bpf: avoid stack copy and use skb ctx for event output") started using 20 of initially reserved upper 32-bits of 'flags' argument in bpf_perf_event_output(). Adjust corresponding prototype in samples/bpf/bpf_helpers.h

Applied, thanks.