Lines Matching refs:fds
263 static int sock_fanout_read(int fds[], char *rings[], const int expect[]) in sock_fanout_read() argument
267 ret[0] = sock_fanout_read_ring(fds[0], rings[0]); in sock_fanout_read()
268 ret[1] = sock_fanout_read_ring(fds[1], rings[1]); in sock_fanout_read()
332 int fds[2]; in test_control_group() local
339 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group()
340 if (fds[0] == -1) { in test_control_group()
360 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group()
361 if (fds[1] == -1) { in test_control_group()
367 if (close(fds[1]) || close(fds[0])) { in test_control_group()
376 int fds[3]; in test_control_group_max_num_members() local
388 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group_max_num_members()
389 if (fds[0] == -1) { in test_control_group_max_num_members()
403 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group_max_num_members()
404 if (fds[1] == -1) { in test_control_group_max_num_members()
411 fds[2] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group_max_num_members()
412 if (fds[2] == -1) { in test_control_group_max_num_members()
417 if (close(fds[2]) || close(fds[1]) || close(fds[0])) { in test_control_group_max_num_members()
426 int fds[3]; in test_unique_fanout_group_ids() local
431 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH | in test_unique_fanout_group_ids()
433 if (fds[0] == -1) { in test_unique_fanout_group_ids()
438 sock_fanout_getopts(fds[0], &typeflags, &first_group_id); in test_unique_fanout_group_ids()
449 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, first_group_id); in test_unique_fanout_group_ids()
450 if (fds[1] == -1) { in test_unique_fanout_group_ids()
456 fds[2] = sock_fanout_open(PACKET_FANOUT_HASH | in test_unique_fanout_group_ids()
458 if (fds[2] == -1) { in test_unique_fanout_group_ids()
464 sock_fanout_getopts(fds[2], &typeflags, &second_group_id); in test_unique_fanout_group_ids()
472 if (close(fds[0]) || close(fds[1]) || close(fds[2])) { in test_unique_fanout_group_ids()
484 int fds[2], fds_udp[2][2], ret; in test_datapath() local
490 fds[0] = sock_fanout_open(typeflags, 0); in test_datapath()
491 fds[1] = sock_fanout_open(typeflags, 0); in test_datapath()
492 if (fds[0] == -1 || fds[1] == -1) { in test_datapath()
497 sock_fanout_set_cbpf(fds[0]); in test_datapath()
499 sock_fanout_set_ebpf(fds[0]); in test_datapath()
501 rings[0] = sock_fanout_open_ring(fds[0]); in test_datapath()
502 rings[1] = sock_fanout_open_ring(fds[1]); in test_datapath()
505 sock_fanout_read(fds, rings, expect0); in test_datapath()
510 ret = sock_fanout_read(fds, rings, expect1); in test_datapath()
515 ret |= sock_fanout_read(fds, rings, expect2); in test_datapath()
524 close(fds[1]) || close(fds[0])) { in test_datapath()