Home
last modified time | relevance | path

Searched refs:fds (Results 1 – 14 of 14) sorted by relevance

/tools/testing/selftests/net/
Dpsock_lib.h71 static __maybe_unused void pair_udp_open(int fds[], uint16_t port) in pair_udp_open() argument
75 fds[0] = socket(PF_INET, SOCK_DGRAM, 0); in pair_udp_open()
76 fds[1] = socket(PF_INET, SOCK_DGRAM, 0); in pair_udp_open()
77 if (fds[0] == -1 || fds[1] == -1) { in pair_udp_open()
93 if (bind(fds[1], (void *) &daddr, sizeof(daddr))) { in pair_udp_open()
97 if (bind(fds[0], (void *) &saddr, sizeof(saddr))) { in pair_udp_open()
101 if (connect(fds[0], (void *) &daddr, sizeof(daddr))) { in pair_udp_open()
107 static __maybe_unused void pair_udp_send_char(int fds[], int num, char payload) in pair_udp_send_char() argument
114 if (write(fds[0], buf, sizeof(buf)) != sizeof(buf)) { in pair_udp_send_char()
118 if (read(fds[1], rbuf, sizeof(rbuf)) != sizeof(rbuf)) { in pair_udp_send_char()
[all …]
Dpsock_fanout.c189 static int sock_fanout_read(int fds[], char *rings[], const int expect[]) in sock_fanout_read() argument
193 ret[0] = sock_fanout_read_ring(fds[0], rings[0]); in sock_fanout_read()
194 ret[1] = sock_fanout_read_ring(fds[1], rings[1]); in sock_fanout_read()
223 int fds[2]; in test_control_group() local
227 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 20); in test_control_group()
228 if (fds[0] == -1) { in test_control_group()
246 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 20); in test_control_group()
247 if (fds[1] == -1) { in test_control_group()
251 if (close(fds[1]) || close(fds[0])) { in test_control_group()
263 int fds[2], fds_udp[2][2], ret; in test_datapath() local
[all …]
/tools/perf/bench/
Dsched-messaging.c54 static void fdpair(int fds[2]) in fdpair()
57 if (pipe(fds) == 0) in fdpair()
60 if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) == 0) in fdpair()
206 int fds[2]; in group() local
214 fdpair(fds); in group()
217 ctx->in_fds[0] = fds[0]; in group()
218 ctx->in_fds[1] = fds[1]; in group()
224 snd_ctx->out_fds[i] = fds[1]; in group()
226 close(fds[0]); in group()
/tools/testing/selftests/powerpc/pmu/ebb/
Debb_on_child_test.c52 FAIL_IF(pipe(read_pipe.fds) == -1); in ebb_on_child()
53 FAIL_IF(pipe(write_pipe.fds) == -1); in ebb_on_child()
Dtask_event_vs_ebb_test.c45 FAIL_IF(pipe(read_pipe.fds) == -1); in task_event_vs_ebb()
46 FAIL_IF(pipe(write_pipe.fds) == -1); in task_event_vs_ebb()
Debb_on_willing_child_test.c57 FAIL_IF(pipe(read_pipe.fds) == -1); in ebb_on_willing_child()
58 FAIL_IF(pipe(write_pipe.fds) == -1); in ebb_on_willing_child()
Debb_vs_cpu_event_test.c50 FAIL_IF(pipe(read_pipe.fds) == -1); in ebb_vs_cpu_event()
51 FAIL_IF(pipe(write_pipe.fds) == -1); in ebb_vs_cpu_event()
Dcpu_event_vs_ebb_test.c50 FAIL_IF(pipe(read_pipe.fds) == -1); in cpu_event_vs_ebb()
51 FAIL_IF(pipe(write_pipe.fds) == -1); in cpu_event_vs_ebb()
Dtask_event_pinned_vs_ebb_test.c47 FAIL_IF(pipe(read_pipe.fds) == -1); in task_event_pinned_vs_ebb()
48 FAIL_IF(pipe(write_pipe.fds) == -1); in task_event_pinned_vs_ebb()
Dcpu_event_pinned_vs_ebb_test.c52 FAIL_IF(pipe(read_pipe.fds) == -1); in cpu_event_pinned_vs_ebb()
53 FAIL_IF(pipe(write_pipe.fds) == -1); in cpu_event_pinned_vs_ebb()
/tools/virtio/
Dvirtio_test.c37 struct pollfd fds[1]; member
108 dev->fds[info->idx].fd = info->call; in vq_info_add()
109 dev->fds[info->idx].events = POLLIN; in vq_info_add()
146 poll(dev->fds, dev->nvqs, -1); in wait_for_interrupt()
148 if (dev->fds[i].revents & POLLIN) { in wait_for_interrupt()
149 read(dev->fds[i].fd, &val, sizeof val); in wait_for_interrupt()
/tools/usb/usbip/src/
Dusbipd.c490 struct pollfd *fds; in do_standalone_mode() local
542 fds = calloc(nsockfd, sizeof(struct pollfd)); in do_standalone_mode()
544 fds[i].fd = sockfdlist[i]; in do_standalone_mode()
545 fds[i].events = POLLIN; in do_standalone_mode()
558 r = ppoll(fds, nsockfd, &timeout, &sigmask); in do_standalone_mode()
564 if (fds[i].revents & POLLIN) { in do_standalone_mode()
576 free(fds); in do_standalone_mode()
/tools/testing/selftests/powerpc/pmu/
Dlib.h19 int fds[2]; member
Dlib.c152 if (pipe(read_pipe.fds) == -1) in eat_cpu()
155 if (pipe(write_pipe.fds) == -1) in eat_cpu()