mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-21 00:39:07 +08:00
sync: add BPF_RAW_INSN macro
Add BPF_RAW_INSNS macro used by libbpf. Signed-off-by: Andrii Nakryiko <andriin@fb.com>
This commit is contained in:
committed by
Andrii Nakryiko
parent
7297e38474
commit
28e26bdc3e
@@ -5,6 +5,14 @@
|
||||
|
||||
#include <linux/bpf.h>
|
||||
|
||||
#define BPF_RAW_INSN(CODE, DST, SRC, OFF, IMM) \
|
||||
((struct bpf_insn) { \
|
||||
.code = CODE, \
|
||||
.dst_reg = DST, \
|
||||
.src_reg = SRC, \
|
||||
.off = OFF, \
|
||||
.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