Lines Matching defs:link_fd
10986 int prog_fd, link_fd = -1, err;
11016 link_fd = bpf_link_create(prog_fd, pfd, BPF_PERF_EVENT, &link_opts);
11017 if (link_fd < 0) {
11023 link->link.fd = link_fd;
11054 if (link_fd >= 0)
11055 close(link_fd);
11734 int err, link_fd, prog_fd;
11807 link_fd = bpf_link_create(prog_fd, 0, attach_type, &lopts);
11808 if (link_fd < 0) {
11814 link->fd = link_fd;
12193 int err = 0, link_fd, prog_fd;
12293 link_fd = bpf_link_create(prog_fd, 0, attach_type, &lopts);
12294 if (link_fd < 0) {
12300 link->fd = link_fd;
12881 int prog_fd, link_fd;
12895 link_fd = bpf_link_create(prog_fd, target_fd, attach_type, opts);
12896 if (link_fd < 0) {
12897 link_fd = -errno;
12901 errstr(link_fd));
12902 return libbpf_err_ptr(link_fd);
12904 link->fd = link_fd;
13072 int prog_fd, link_fd;
13092 link_fd = bpf_link_create(prog_fd, target_fd, BPF_TRACE_ITER,
13094 if (link_fd < 0) {
13095 link_fd = -errno;
13098 prog->name, errstr(link_fd));
13099 return libbpf_err_ptr(link_fd);
13101 link->fd = link_fd;
13116 int prog_fd, link_fd;
13138 link_fd = bpf_link_create(prog_fd, 0, BPF_NETFILTER, &lopts);
13139 if (link_fd < 0) {
13140 link_fd = -errno;
13143 prog->name, errstr(link_fd));
13144 return libbpf_err_ptr(link_fd);
13146 link->fd = link_fd;