Home
last modified time | relevance | path

Searched refs:link_fd (Results 1 – 6 of 6) sorted by relevance

/tools/testing/selftests/bpf/prog_tests/
Dfexit_stress.c12 int link_fd[CNT] = {}; in test_fexit_stress() local
54 link_fd[i] = bpf_raw_tracepoint_open(NULL, fexit_fd[i]); in test_fexit_stress()
55 if (CHECK(link_fd[i] < 0, "fexit attach failed", in test_fexit_stress()
56 "prog %d failed: %d err %d\n", i, link_fd[i], errno)) in test_fexit_stress()
71 if (link_fd[i]) in test_fexit_stress()
72 close(link_fd[i]); in test_fexit_stress()
Dbpf_obj_id.c302 int link_fd, cmp_res; in test_bpf_obj_id() local
307 link_fd = bpf_link_get_fd_by_id(next_id); in test_bpf_obj_id()
308 if (link_fd < 0 && errno == ENOENT) in test_bpf_obj_id()
311 if (CHECK(link_fd < 0, "get-link-fd(next_id)", in test_bpf_obj_id()
313 link_fd, next_id, errno)) in test_bpf_obj_id()
325 err = bpf_obj_get_info_by_fd(link_fd, &link_info, &info_len); in test_bpf_obj_id()
334 close(link_fd); in test_bpf_obj_id()
/tools/lib/bpf/
Dbpf.h185 LIBBPF_API int bpf_link_detach(int link_fd);
194 LIBBPF_API int bpf_link_update(int link_fd, int new_prog_fd,
197 LIBBPF_API int bpf_iter_create(int link_fd);
Dbpf.c618 int bpf_link_detach(int link_fd) in bpf_link_detach() argument
623 attr.link_detach.link_fd = link_fd; in bpf_link_detach()
628 int bpf_link_update(int link_fd, int new_prog_fd, in bpf_link_update() argument
637 attr.link_update.link_fd = link_fd; in bpf_link_update()
645 int bpf_iter_create(int link_fd) in bpf_iter_create() argument
650 attr.iter_create.link_fd = link_fd; in bpf_iter_create()
Dlibbpf.c9719 int prog_fd, link_fd; in bpf_program__attach_fd() local
9733 link_fd = bpf_link_create(prog_fd, target_fd, attach_type, &opts); in bpf_program__attach_fd()
9734 if (link_fd < 0) { in bpf_program__attach_fd()
9735 link_fd = -errno; in bpf_program__attach_fd()
9739 libbpf_strerror_r(link_fd, errmsg, sizeof(errmsg))); in bpf_program__attach_fd()
9740 return ERR_PTR(link_fd); in bpf_program__attach_fd()
9742 link->fd = link_fd; in bpf_program__attach_fd()
9803 int prog_fd, link_fd; in bpf_program__attach_iter() local
9823 link_fd = bpf_link_create(prog_fd, target_fd, BPF_TRACE_ITER, in bpf_program__attach_iter()
9825 if (link_fd < 0) { in bpf_program__attach_iter()
[all …]
/tools/include/uapi/linux/
Dbpf.h676 __u32 link_fd; /* link fd */ member
686 __u32 link_fd; member
694 __u32 link_fd; member