Skip to content

Commit 05b8ad2

Browse files
adam-barthdavem330
authored andcommitted
samples/bpf: fix bpf_perf_event_output prototype
The commit 555c8a8 ("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 Signed-off-by: Adam Barth <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent fff8019 commit 05b8ad2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

samples/bpf/bpf_helpers.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ static int (*bpf_clone_redirect)(void *ctx, int ifindex, int flags) =
3737
(void *) BPF_FUNC_clone_redirect;
3838
static int (*bpf_redirect)(int ifindex, int flags) =
3939
(void *) BPF_FUNC_redirect;
40-
static int (*bpf_perf_event_output)(void *ctx, void *map, int index, void *data, int size) =
40+
static int (*bpf_perf_event_output)(void *ctx, void *map,
41+
unsigned long long flags, void *data,
42+
int size) =
4143
(void *) BPF_FUNC_perf_event_output;
4244
static int (*bpf_get_stackid)(void *ctx, void *map, int flags) =
4345
(void *) BPF_FUNC_get_stackid;

0 commit comments

Comments
 (0)