mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-10 00:33:22 -04:00
libbpf: Add support for attaching BPF programs to other BPF programs
Extend libbpf api to pass attach_prog_fd into bpf_object__open. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Song Liu <songliubraving@fb.com> Link: https://lore.kernel.org/bpf/20191114185720.1641606-19-ast@kernel.org
This commit is contained in:
parent
5b92a28aae
commit
e7bf94dbb8
5 changed files with 71 additions and 17 deletions
|
@ -425,6 +425,7 @@ union bpf_attr {
|
|||
__aligned_u64 line_info; /* line info */
|
||||
__u32 line_info_cnt; /* number of bpf_line_info records */
|
||||
__u32 attach_btf_id; /* in-kernel BTF type id to attach to */
|
||||
__u32 attach_prog_fd; /* 0 to attach to vmlinux */
|
||||
};
|
||||
|
||||
struct { /* anonymous struct used by BPF_OBJ_* commands */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue