mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-24 10:19:07 +08:00
include: add BPF_ALU32_IMM macro implementation
BPF_ALU32_IMM is now used in gen_loader.c. Add its definition to include/linux/filter.h header. Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
This commit is contained in:
committed by
Andrii Nakryiko
parent
c4f9ee9fbb
commit
17d7f04e7c
@@ -13,6 +13,14 @@
|
||||
.off = OFF, \
|
||||
.imm = IMM })
|
||||
|
||||
#define BPF_ALU32_IMM(OP, DST, IMM) \
|
||||
((struct bpf_insn) { \
|
||||
.code = BPF_ALU | BPF_OP(OP) | BPF_K, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = 0, \
|
||||
.off = 0, \
|
||||
.imm = IMM })
|
||||
|
||||
#define BPF_ALU64_IMM(OP, DST, IMM) \
|
||||
((struct bpf_insn) { \
|
||||
.code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \
|
||||
|
||||
Reference in New Issue
Block a user