summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests
diff options
context:
space:
mode:
authorYonghong Song <yonghong.song@linux.dev>2025-06-06 19:31:46 +0300
committerAndrii Nakryiko <andrii@kernel.org>2025-06-10 02:28:30 +0300
commit1d6711667cb358fd2971c760a67b4fe843179d15 (patch)
treef7dc2d20bd3ecc79a3df962ff5dc6d819a443b44 /tools/testing/selftests/bpf/prog_tests
parent1209339844601ec1766f4ff430673fbcfe42bb51 (diff)
downloadlinux-1d6711667cb358fd2971c760a67b4fe843179d15.tar.xz
libbpf: Support link-based cgroup attach with options
Currently libbpf supports bpf_program__attach_cgroup() with signature: LIBBPF_API struct bpf_link * bpf_program__attach_cgroup(const struct bpf_program *prog, int cgroup_fd); To support mprog style attachment, additionsl fields like flags, relative_{fd,id} and expected_revision are needed. Add a new API: LIBBPF_API struct bpf_link * bpf_program__attach_cgroup_opts(const struct bpf_program *prog, int cgroup_fd, const struct bpf_cgroup_opts *opts); where bpf_cgroup_opts contains all above needed fields. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20250606163146.2429212-1-yonghong.song@linux.dev
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests')
0 files changed, 0 insertions, 0 deletions