Lines Matching refs:fds
188 static int sock_fanout_read(int fds[], char *rings[], const int expect[]) in sock_fanout_read() argument
192 ret[0] = sock_fanout_read_ring(fds[0], rings[0]); in sock_fanout_read()
193 ret[1] = sock_fanout_read_ring(fds[1], rings[1]); in sock_fanout_read()
222 int fds[2]; in test_control_group() local
226 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 20); in test_control_group()
227 if (fds[0] == -1) { in test_control_group()
245 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 20); in test_control_group()
246 if (fds[1] == -1) { in test_control_group()
250 if (close(fds[1]) || close(fds[0])) { in test_control_group()
262 int fds[2], fds_udp[2][2], ret; in test_datapath() local
266 fds[0] = sock_fanout_open(typeflags, 20); in test_datapath()
267 fds[1] = sock_fanout_open(typeflags, 20); in test_datapath()
268 if (fds[0] == -1 || fds[1] == -1) { in test_datapath()
273 sock_setfilter(fds[0], SOL_PACKET, PACKET_FANOUT_DATA); in test_datapath()
275 sock_fanout_set_ebpf(fds[0]); in test_datapath()
277 rings[0] = sock_fanout_open_ring(fds[0]); in test_datapath()
278 rings[1] = sock_fanout_open_ring(fds[1]); in test_datapath()
281 sock_fanout_read(fds, rings, expect0); in test_datapath()
286 ret = sock_fanout_read(fds, rings, expect1); in test_datapath()
291 ret |= sock_fanout_read(fds, rings, expect2); in test_datapath()
300 close(fds[1]) || close(fds[0])) { in test_datapath()