• Home
  • Raw
  • Download

Lines Matching refs:link_fd

4365 	int prog_fd, link_fd, err;  in probe_perf_link()  local
4379 link_fd = bpf_link_create(prog_fd, -1, BPF_PERF_EVENT, NULL); in probe_perf_link()
4382 if (link_fd >= 0) in probe_perf_link()
4383 close(link_fd); in probe_perf_link()
4386 return link_fd < 0 && err == -EBADF; in probe_perf_link()
9050 int prog_fd, link_fd = -1, err; in bpf_program__attach_perf_event_opts() local
9078 link_fd = bpf_link_create(prog_fd, pfd, BPF_PERF_EVENT, &link_opts); in bpf_program__attach_perf_event_opts()
9079 if (link_fd < 0) { in bpf_program__attach_perf_event_opts()
9086 link->link.fd = link_fd; in bpf_program__attach_perf_event_opts()
9114 if (link_fd >= 0) in bpf_program__attach_perf_event_opts()
9115 close(link_fd); in bpf_program__attach_perf_event_opts()
9585 int prog_fd, link_fd; in bpf_program__attach_fd() local
9599 link_fd = bpf_link_create(prog_fd, target_fd, attach_type, &opts); in bpf_program__attach_fd()
9600 if (link_fd < 0) { in bpf_program__attach_fd()
9601 link_fd = -errno; in bpf_program__attach_fd()
9605 libbpf_strerror_r(link_fd, errmsg, sizeof(errmsg))); in bpf_program__attach_fd()
9606 return libbpf_err_ptr(link_fd); in bpf_program__attach_fd()
9608 link->fd = link_fd; in bpf_program__attach_fd()
9669 int prog_fd, link_fd; in bpf_program__attach_iter() local
9689 link_fd = bpf_link_create(prog_fd, target_fd, BPF_TRACE_ITER, in bpf_program__attach_iter()
9691 if (link_fd < 0) { in bpf_program__attach_iter()
9692 link_fd = -errno; in bpf_program__attach_iter()
9695 prog->name, libbpf_strerror_r(link_fd, errmsg, sizeof(errmsg))); in bpf_program__attach_iter()
9696 return libbpf_err_ptr(link_fd); in bpf_program__attach_iter()
9698 link->fd = link_fd; in bpf_program__attach_iter()