add BPF_EMIT_CALL macro for libbpf_probes.c

libbpf_probes.c accessed BPF_EMIT_CALL. Added the
definition in include/linux/filter.h.

Signed-off-by: Yonghong Song <yhs@fb.com>
This commit is contained in:
Yonghong Song
2019-02-04 14:39:30 -08:00
parent 1dc0296fce
commit 30388a7afd

View File

@@ -21,4 +21,12 @@
.off = 0, \
.imm = 0 })
#define BPF_EMIT_CALL(FUNC) \
((struct bpf_insn) { \
.code = BPF_JMP | BPF_CALL, \
.dst_reg = 0, \
.src_reg = 0, \
.off = 0, \
.imm = ((FUNC) - BPF_FUNC_unspec) })
#endif