Lines Matching refs:link_fd

10912 	int prog_fd, link_fd = -1, err;  in bpf_program__attach_perf_event_opts()  local
10942 link_fd = bpf_link_create(prog_fd, pfd, BPF_PERF_EVENT, &link_opts); in bpf_program__attach_perf_event_opts()
10943 if (link_fd < 0) { in bpf_program__attach_perf_event_opts()
10949 link->link.fd = link_fd; in bpf_program__attach_perf_event_opts()
10980 if (link_fd >= 0) in bpf_program__attach_perf_event_opts()
10981 close(link_fd); in bpf_program__attach_perf_event_opts()
11660 int err, link_fd, prog_fd; in bpf_program__attach_kprobe_multi_opts() local
11733 link_fd = bpf_link_create(prog_fd, 0, attach_type, &lopts); in bpf_program__attach_kprobe_multi_opts()
11734 if (link_fd < 0) { in bpf_program__attach_kprobe_multi_opts()
11740 link->fd = link_fd; in bpf_program__attach_kprobe_multi_opts()
12119 int err = 0, link_fd, prog_fd; in bpf_program__attach_uprobe_multi() local
12219 link_fd = bpf_link_create(prog_fd, 0, attach_type, &lopts); in bpf_program__attach_uprobe_multi()
12220 if (link_fd < 0) { in bpf_program__attach_uprobe_multi()
12226 link->fd = link_fd; in bpf_program__attach_uprobe_multi()
12807 int prog_fd, link_fd; in bpf_program_attach_fd() local
12821 link_fd = bpf_link_create(prog_fd, target_fd, attach_type, opts); in bpf_program_attach_fd()
12822 if (link_fd < 0) { in bpf_program_attach_fd()
12823 link_fd = -errno; in bpf_program_attach_fd()
12827 errstr(link_fd)); in bpf_program_attach_fd()
12828 return libbpf_err_ptr(link_fd); in bpf_program_attach_fd()
12830 link->fd = link_fd; in bpf_program_attach_fd()
12998 int prog_fd, link_fd; in bpf_program__attach_iter() local
13018 link_fd = bpf_link_create(prog_fd, target_fd, BPF_TRACE_ITER, in bpf_program__attach_iter()
13020 if (link_fd < 0) { in bpf_program__attach_iter()
13021 link_fd = -errno; in bpf_program__attach_iter()
13024 prog->name, errstr(link_fd)); in bpf_program__attach_iter()
13025 return libbpf_err_ptr(link_fd); in bpf_program__attach_iter()
13027 link->fd = link_fd; in bpf_program__attach_iter()
13042 int prog_fd, link_fd; in bpf_program__attach_netfilter() local
13064 link_fd = bpf_link_create(prog_fd, 0, BPF_NETFILTER, &lopts); in bpf_program__attach_netfilter()
13065 if (link_fd < 0) { in bpf_program__attach_netfilter()
13066 link_fd = -errno; in bpf_program__attach_netfilter()
13069 prog->name, errstr(link_fd)); in bpf_program__attach_netfilter()
13070 return libbpf_err_ptr(link_fd); in bpf_program__attach_netfilter()
13072 link->fd = link_fd; in bpf_program__attach_netfilter()