Lines Matching refs:cgroup_fd

169 static int count_attached_bpf_progs(int cgroup_fd, enum bpf_attach_type type)  in count_attached_bpf_progs()  argument
174 ret = bpf_prog_query(cgroup_fd, type, query_flags, NULL, in count_attached_bpf_progs()
182 static int cgroup_has_attached_progs(int cgroup_fd) in cgroup_has_attached_progs() argument
188 int count = count_attached_bpf_progs(cgroup_fd, type); in cgroup_has_attached_progs()
202 static int show_effective_bpf_progs(int cgroup_fd, enum bpf_attach_type type, in show_effective_bpf_progs() argument
214 ret = bpf_prog_query_opts(cgroup_fd, type, &p); in show_effective_bpf_progs()
227 static int show_attached_bpf_progs(int cgroup_fd, enum bpf_attach_type type, in show_attached_bpf_progs() argument
243 ret = bpf_prog_query_opts(cgroup_fd, type, &p); in show_attached_bpf_progs()
277 static int show_bpf_progs(int cgroup_fd, enum bpf_attach_type type, in show_bpf_progs() argument
281 show_effective_bpf_progs(cgroup_fd, type, level) : in show_bpf_progs()
282 show_attached_bpf_progs(cgroup_fd, type, level); in show_bpf_progs()
290 int cgroup_fd; in do_show() local
314 cgroup_fd = open(path, O_RDONLY); in do_show()
315 if (cgroup_fd < 0) { in do_show()
320 has_attached_progs = cgroup_has_attached_progs(cgroup_fd); in do_show()
346 if (show_bpf_progs(cgroup_fd, type, 0) == 0) in do_show()
354 close(cgroup_fd); in do_show()
371 int cgroup_fd; in do_show_tree_fn() local
376 cgroup_fd = open(fpath, O_RDONLY); in do_show_tree_fn()
377 if (cgroup_fd < 0) { in do_show_tree_fn()
382 has_attached_progs = cgroup_has_attached_progs(cgroup_fd); in do_show_tree_fn()
386 close(cgroup_fd); in do_show_tree_fn()
389 close(cgroup_fd); in do_show_tree_fn()
404 show_bpf_progs(cgroup_fd, type, ftw->level); in do_show_tree_fn()
418 close(cgroup_fd); in do_show_tree_fn()
513 int cgroup_fd, prog_fd; in do_attach() local
523 cgroup_fd = open(argv[0], O_RDONLY); in do_attach()
524 if (cgroup_fd < 0) { in do_attach()
552 if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, attach_flags)) { in do_attach()
565 close(cgroup_fd); in do_attach()
573 int prog_fd, cgroup_fd; in do_detach() local
581 cgroup_fd = open(argv[0], O_RDONLY); in do_detach()
582 if (cgroup_fd < 0) { in do_detach()
599 if (bpf_prog_detach2(prog_fd, cgroup_fd, attach_type)) { in do_detach()
612 close(cgroup_fd); in do_detach()