Lines Matching refs:fds
234 static int sock_fanout_read(int fds[], char *rings[], const int expect[]) in sock_fanout_read() argument
238 ret[0] = sock_fanout_read_ring(fds[0], rings[0]); in sock_fanout_read()
239 ret[1] = sock_fanout_read_ring(fds[1], rings[1]); in sock_fanout_read()
268 int fds[2]; in test_control_group() local
272 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group()
273 if (fds[0] == -1) { in test_control_group()
291 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group()
292 if (fds[1] == -1) { in test_control_group()
296 if (close(fds[1]) || close(fds[0])) { in test_control_group()
305 int fds[3]; in test_control_group_max_num_members() local
317 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group_max_num_members()
318 if (fds[0] == -1) { in test_control_group_max_num_members()
332 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group_max_num_members()
333 if (fds[1] == -1) { in test_control_group_max_num_members()
340 fds[2] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group_max_num_members()
341 if (fds[2] == -1) { in test_control_group_max_num_members()
346 if (close(fds[2]) || close(fds[1]) || close(fds[0])) { in test_control_group_max_num_members()
355 int fds[3]; in test_unique_fanout_group_ids() local
360 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH | in test_unique_fanout_group_ids()
362 if (fds[0] == -1) { in test_unique_fanout_group_ids()
367 sock_fanout_getopts(fds[0], &typeflags, &first_group_id); in test_unique_fanout_group_ids()
378 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, first_group_id); in test_unique_fanout_group_ids()
379 if (fds[1] == -1) { in test_unique_fanout_group_ids()
385 fds[2] = sock_fanout_open(PACKET_FANOUT_HASH | in test_unique_fanout_group_ids()
387 if (fds[2] == -1) { in test_unique_fanout_group_ids()
393 sock_fanout_getopts(fds[2], &typeflags, &second_group_id); in test_unique_fanout_group_ids()
401 if (close(fds[0]) || close(fds[1]) || close(fds[2])) { in test_unique_fanout_group_ids()
413 int fds[2], fds_udp[2][2], ret; in test_datapath() local
419 fds[0] = sock_fanout_open(typeflags, 0); in test_datapath()
420 fds[1] = sock_fanout_open(typeflags, 0); in test_datapath()
421 if (fds[0] == -1 || fds[1] == -1) { in test_datapath()
426 sock_fanout_set_cbpf(fds[0]); in test_datapath()
428 sock_fanout_set_ebpf(fds[0]); in test_datapath()
430 rings[0] = sock_fanout_open_ring(fds[0]); in test_datapath()
431 rings[1] = sock_fanout_open_ring(fds[1]); in test_datapath()
434 sock_fanout_read(fds, rings, expect0); in test_datapath()
439 ret = sock_fanout_read(fds, rings, expect1); in test_datapath()
444 ret |= sock_fanout_read(fds, rings, expect2); in test_datapath()
453 close(fds[1]) || close(fds[0])) { in test_datapath()