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:
committed by
Daniel Borkmann
parent
5b92a28aae
commit
e7bf94dbb8
@@ -108,8 +108,9 @@ struct bpf_object_open_opts {
|
||||
* auto-pinned to that path on load; defaults to "/sys/fs/bpf".
|
||||
*/
|
||||
const char *pin_root_path;
|
||||
__u32 attach_prog_fd;
|
||||
};
|
||||
#define bpf_object_open_opts__last_field pin_root_path
|
||||
#define bpf_object_open_opts__last_field attach_prog_fd
|
||||
|
||||
LIBBPF_API struct bpf_object *bpf_object__open(const char *path);
|
||||
LIBBPF_API struct bpf_object *
|
||||
|
||||
Reference in New Issue
Block a user