Home
last modified time | relevance | path

Searched refs:target_fd (Results 1 – 16 of 16) sorted by relevance

/linux/tools/testing/selftests/proc/
A Dfd-001-lookup.c102 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()
/linux/tools/hv/
A Dhv_fcopy_daemon.c24 static int target_fd; variable
74 target_fd = open(target_fname, in hv_start_fcopy()
76 if (target_fd == -1) { in hv_start_fcopy()
93 bytes_written = pwrite(target_fd, cpmsg->data, cpmsg->size, in hv_copy_data()
125 close(target_fd); in hv_copy_finished()
131 close(target_fd); in hv_copy_cancel()
/linux/tools/testing/selftests/bpf/prog_tests/
A Dtc_redirect.c607 static int tun_relay_loop(int src_fd, int target_fd) in tun_relay_loop() argument
619 FD_SET(target_fd, &rfds); in tun_relay_loop()
621 if (select(1 + MAX(src_fd, target_fd), &rfds, NULL, NULL, NULL) < 0) { in tun_relay_loop()
628 nread = read(direction == SRC_TO_TARGET ? src_fd : target_fd, buf, sizeof(buf)); in tun_relay_loop()
634 nwrite = write(direction == SRC_TO_TARGET ? target_fd : src_fd, buf, nread); in tun_relay_loop()
648 int src_fd, target_fd = -1; in test_tc_redirect_peer_l3() local
672 target_fd = tun_open("tun_fwd"); in test_tc_redirect_peer_l3()
673 if (!ASSERT_GE(target_fd, 0, "tun_open tun_fwd")) in test_tc_redirect_peer_l3()
681 exit(tun_relay_loop(src_fd, target_fd)); in test_tc_redirect_peer_l3()
755 if (target_fd >= 0) in test_tc_redirect_peer_l3()
[all …]
/linux/tools/lib/bpf/
A Dbpf.c652 int bpf_prog_attach(int prog_fd, int target_fd, enum bpf_attach_type type, in bpf_prog_attach() argument
659 return bpf_prog_attach_xattr(prog_fd, target_fd, type, &opts); in bpf_prog_attach()
662 int bpf_prog_attach_xattr(int prog_fd, int target_fd, in bpf_prog_attach_xattr() argument
673 attr.target_fd = target_fd; in bpf_prog_attach_xattr()
683 int bpf_prog_detach(int target_fd, enum bpf_attach_type type) in bpf_prog_detach() argument
689 attr.target_fd = target_fd; in bpf_prog_detach()
696 int bpf_prog_detach2(int prog_fd, int target_fd, enum bpf_attach_type type) in bpf_prog_detach2() argument
702 attr.target_fd = target_fd; in bpf_prog_detach2()
710 int bpf_link_create(int prog_fd, int target_fd, in bpf_link_create() argument
734 attr.link_create.target_fd = target_fd; in bpf_link_create()
[all …]
A Dbpf.h189 LIBBPF_API int bpf_link_create(int prog_fd, int target_fd,
242 LIBBPF_API int bpf_prog_query(int target_fd, enum bpf_attach_type type,
A Dlibbpf.h389 int target_fd, const char *attach_func_name);
A Dlibbpf.c10208 bpf_program__attach_fd(const struct bpf_program *prog, int target_fd, int btf_id, in bpf_program__attach_fd() argument
10230 link_fd = bpf_link_create(prog_fd, target_fd, attach_type, &opts); in bpf_program__attach_fd()
10262 int target_fd, in bpf_program__attach_freplace() argument
10267 if (!!target_fd != !!attach_func_name) { in bpf_program__attach_freplace()
10279 if (target_fd) { in bpf_program__attach_freplace()
10280 btf_id = libbpf_find_prog_btf_id(attach_func_name, target_fd); in bpf_program__attach_freplace()
10284 return bpf_program__attach_fd(prog, target_fd, btf_id, "freplace"); in bpf_program__attach_freplace()
10301 __u32 target_fd = 0; in bpf_program__attach_iter() local
10320 link_fd = bpf_link_create(prog_fd, target_fd, BPF_TRACE_ITER, in bpf_program__attach_iter()
/linux/drivers/media/rc/
A Dbpf-lirc.c252 rcdev = rc_dev_get_from_fd(attr->target_fd); in lirc_prog_attach()
277 rcdev = rc_dev_get_from_fd(attr->target_fd); in lirc_prog_detach()
302 rcdev = rc_dev_get_from_fd(attr->query.target_fd); in lirc_prog_query()
/linux/kernel/bpf/
A Dnet_namespace.c284 net = get_net_ns_by_fd(attr->query.target_fd); in netns_bpf_prog_query()
304 if (attr->target_fd || attr->attach_flags || attr->replace_bpf_fd) in netns_bpf_prog_attach()
388 if (attr->target_fd) in netns_bpf_prog_detach()
493 net = get_net_ns_by_fd(attr->link_create.target_fd); in netns_bpf_link_create()
A Dcgroup.c835 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_attach()
863 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_detach()
980 cgrp = cgroup_get_from_fd(attr->link_create.target_fd); in cgroup_bpf_link_attach()
1020 cgrp = cgroup_get_from_fd(attr->query.target_fd); in cgroup_bpf_prog_query()
A Dbpf_iter.c510 if (attr->link_create.target_fd || attr->link_create.flags) in bpf_iter_link_attach()
A Dsyscall.c2983 perf_file = perf_event_get(attr->link_create.target_fd); in bpf_perf_link_attach()
4239 attr->link_create.target_fd, in tracing_bpf_link_attach()
/linux/tools/include/uapi/linux/
A Dbpf.h1356 __u32 target_fd; /* container object to attach to */ member
1408 __u32 target_fd; /* container object to query */ member
1448 __u32 target_fd; /* object to attach to */ member
/linux/include/uapi/linux/
A Dbpf.h1356 __u32 target_fd; /* container object to attach to */ member
1408 __u32 target_fd; /* container object to query */ member
1448 __u32 target_fd; /* object to attach to */ member
/linux/Documentation/bpf/
A Dprog_sk_lookup.rst38 netns FD as attachment ``target_fd``.
/linux/net/core/
A Dsock_map.c64 u32 ufd = attr->target_fd; in sock_map_get_from_fd()
83 u32 ufd = attr->target_fd; in sock_map_prog_detach()

Completed in 73 milliseconds