samples/bpf: add a test for bpf_override_return
[linux-block.git] / tools / testing / selftests / bpf / bpf_helpers.h
index fd9a17fa8a8bd188aebbf2104dcb196c7dd6e2cf..33cb00e46c49f967d4144f0188333025ead64823 100644 (file)
@@ -82,7 +82,8 @@ static int (*bpf_perf_event_read_value)(void *map, unsigned long long flags,
 static int (*bpf_perf_prog_read_value)(void *ctx, void *buf,
                                       unsigned int buf_size) =
        (void *) BPF_FUNC_perf_prog_read_value;
-
+static int (*bpf_override_return)(void *ctx, unsigned long rc) =
+       (void *) BPF_FUNC_override_return;
 
 /* llvm builtin functions that eBPF C program may use to
  * emit BPF_LD_ABS and BPF_LD_IND instructions