| /tools/testing/selftests/proc/ |
| A D | fd-001-lookup.c | 102 unsigned int fd, target_fd; in main() local 156 target_fd = 1023; in main() 157 while (target_fd > 0) { in main() 158 if (dup2(fd, target_fd) == target_fd) in main() 160 target_fd /= 2; in main() 162 assert(target_fd > 0); in main() 164 test_lookup(target_fd); in main() 165 close(target_fd); in main()
|
| /tools/hv/ |
| A D | hv_fcopy_uio_daemon.c | 110 static int target_fd; variable 161 target_fd = open(target_fname, in hv_fcopy_create_file() 163 if (target_fd == -1) { in hv_fcopy_create_file() 181 len = pwrite(target_fd, cpmsg->data, cpmsg->size, cpmsg->offset); in hv_copy_data() 202 close(target_fd); in hv_copy_finished()
|
| /tools/lib/bpf/ |
| A D | bpf.c | 637 return bpf_prog_attach_opts(prog_fd, target_fd, type, &opts); in bpf_prog_attach() 660 attr.target_fd = target; in bpf_prog_attach_opts() 698 attr.target_fd = target; in bpf_prog_detach_opts() 715 int bpf_prog_detach(int target_fd, enum bpf_attach_type type) in bpf_prog_detach() argument 717 return bpf_prog_detach_opts(0, target_fd, type, NULL); in bpf_prog_detach() 722 return bpf_prog_detach_opts(prog_fd, target_fd, type, NULL); in bpf_prog_detach2() 725 int bpf_link_create(int prog_fd, int target_fd, in bpf_link_create() argument 750 attr.link_create.target_fd = target_fd; in bpf_link_create() 903 if (attr.link_create.target_fd || attr.link_create.target_btf_id) in bpf_link_create() 987 attr.query.target_fd = target; in bpf_prog_query_opts() [all …]
|
| A D | skel_internal.h | 289 static inline int skel_link_create(int prog_fd, int target_fd, in skel_link_create() argument 297 attr.link_create.target_fd = target_fd; in skel_link_create()
|
| A D | bpf.h | 451 LIBBPF_API int bpf_link_create(int prog_fd, int target_fd, 625 LIBBPF_API int bpf_prog_query(int target_fd, enum bpf_attach_type type,
|
| A D | libbpf.h | 835 int target_fd, const char *attach_func_name);
|
| A D | libbpf.c | 12802 int target_fd, const char *target_name, in bpf_program_attach_fd() argument 12821 link_fd = bpf_link_create(prog_fd, target_fd, attach_type, opts); in bpf_program_attach_fd() 12956 int target_fd, in bpf_program__attach_freplace() argument 12961 if (!!target_fd != !!attach_func_name) { in bpf_program__attach_freplace() 12973 if (target_fd) { in bpf_program__attach_freplace() 12976 btf_id = libbpf_find_prog_btf_id(attach_func_name, target_fd, prog->obj->token_fd); in bpf_program__attach_freplace() 12982 return bpf_program_attach_fd(prog, target_fd, "freplace", in bpf_program__attach_freplace() 12999 __u32 target_fd = 0; in bpf_program__attach_iter() local 13018 link_fd = bpf_link_create(prog_fd, target_fd, BPF_TRACE_ITER, in bpf_program__attach_iter()
|
| /tools/testing/selftests/bpf/prog_tests/ |
| A D | tc_redirect.c | 1117 static int tun_relay_loop(int src_fd, int target_fd) in tun_relay_loop() argument 1129 FD_SET(target_fd, &rfds); in tun_relay_loop() 1131 if (select(1 + MAX(src_fd, target_fd), &rfds, NULL, NULL, NULL) < 0) { in tun_relay_loop() 1138 nread = read(direction == SRC_TO_TARGET ? src_fd : target_fd, buf, sizeof(buf)); in tun_relay_loop() 1144 nwrite = write(direction == SRC_TO_TARGET ? target_fd : src_fd, buf, nread); in tun_relay_loop() 1160 int src_fd, target_fd = -1; in test_tc_redirect_peer_l3() local 1184 target_fd = tun_open("tun_fwd"); in test_tc_redirect_peer_l3() 1185 if (!ASSERT_GE(target_fd, 0, "tun_open tun_fwd")) in test_tc_redirect_peer_l3() 1193 exit(tun_relay_loop(src_fd, target_fd)); in test_tc_redirect_peer_l3() 1257 if (target_fd >= 0) in test_tc_redirect_peer_l3() [all …]
|
| /tools/include/uapi/linux/ |
| A D | bpf.h | 1625 __u32 target_fd; /* target object to attach to or ... */ member 1684 __u32 target_fd; /* target object to query or ... */ member 1752 __u32 target_fd; /* target object to attach to or ... */ member
|