From 5150a4a0fb62b161b9732783d366db18eb6fe7c5 Mon Sep 17 00:00:00 2001 From: Andrii Nakryiko Date: Thu, 24 Oct 2019 22:48:15 -0700 Subject: [PATCH] includes: add BPF_JMP32_IMM macro to fix build Recent xsk change started using new BPF_JMP32_IMM macro. Add it to our local copy of include/linux/filter.h to fix the build. Signed-off-by: Andrii Nakryiko --- include/linux/filter.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/filter.h b/include/linux/filter.h index fd15fa1..b0700e2 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -107,5 +107,12 @@ .off = OFF, \ .imm = IMM }) +#define BPF_JMP32_IMM(OP, DST, IMM, OFF) \ + ((struct bpf_insn) { \ + .code = BPF_JMP32 | BPF_OP(OP) | BPF_K, \ + .dst_reg = DST, \ + .src_reg = 0, \ + .off = OFF, \ + .imm = IMM }) #endif