Lines Matching refs:fds
189 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
267 fds[0] = sock_fanout_open(typeflags, 20); in test_datapath()
268 fds[1] = sock_fanout_open(typeflags, 20); in test_datapath()
269 if (fds[0] == -1 || fds[1] == -1) { in test_datapath()
274 sock_setfilter(fds[0], SOL_PACKET, PACKET_FANOUT_DATA); in test_datapath()
276 sock_fanout_set_ebpf(fds[0]); in test_datapath()
278 rings[0] = sock_fanout_open_ring(fds[0]); in test_datapath()
279 rings[1] = sock_fanout_open_ring(fds[1]); in test_datapath()
282 sock_fanout_read(fds, rings, expect0); in test_datapath()
287 ret = sock_fanout_read(fds, rings, expect1); in test_datapath()
292 ret |= sock_fanout_read(fds, rings, expect2); in test_datapath()
301 close(fds[1]) || close(fds[0])) { in test_datapath()