Lines Matching refs:fds

235 static int sock_fanout_read(int fds[], char *rings[], const int expect[])  in sock_fanout_read()  argument
239 ret[0] = sock_fanout_read_ring(fds[0], rings[0]); in sock_fanout_read()
240 ret[1] = sock_fanout_read_ring(fds[1], rings[1]); in sock_fanout_read()
269 int fds[2]; in test_control_group() local
273 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group()
274 if (fds[0] == -1) { in test_control_group()
292 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group()
293 if (fds[1] == -1) { in test_control_group()
297 if (close(fds[1]) || close(fds[0])) { in test_control_group()
306 int fds[3]; in test_control_group_max_num_members() local
318 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group_max_num_members()
319 if (fds[0] == -1) { in test_control_group_max_num_members()
333 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group_max_num_members()
334 if (fds[1] == -1) { in test_control_group_max_num_members()
341 fds[2] = sock_fanout_open(PACKET_FANOUT_HASH, 0); in test_control_group_max_num_members()
342 if (fds[2] == -1) { in test_control_group_max_num_members()
347 if (close(fds[2]) || close(fds[1]) || close(fds[0])) { in test_control_group_max_num_members()
356 int fds[3]; in test_unique_fanout_group_ids() local
361 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH | in test_unique_fanout_group_ids()
363 if (fds[0] == -1) { in test_unique_fanout_group_ids()
368 sock_fanout_getopts(fds[0], &typeflags, &first_group_id); in test_unique_fanout_group_ids()
379 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, first_group_id); in test_unique_fanout_group_ids()
380 if (fds[1] == -1) { in test_unique_fanout_group_ids()
386 fds[2] = sock_fanout_open(PACKET_FANOUT_HASH | in test_unique_fanout_group_ids()
388 if (fds[2] == -1) { in test_unique_fanout_group_ids()
394 sock_fanout_getopts(fds[2], &typeflags, &second_group_id); in test_unique_fanout_group_ids()
402 if (close(fds[0]) || close(fds[1]) || close(fds[2])) { in test_unique_fanout_group_ids()
414 int fds[2], fds_udp[2][2], ret; in test_datapath() local
420 fds[0] = sock_fanout_open(typeflags, 0); in test_datapath()
421 fds[1] = sock_fanout_open(typeflags, 0); in test_datapath()
422 if (fds[0] == -1 || fds[1] == -1) { in test_datapath()
427 sock_fanout_set_cbpf(fds[0]); in test_datapath()
429 sock_fanout_set_ebpf(fds[0]); in test_datapath()
431 rings[0] = sock_fanout_open_ring(fds[0]); in test_datapath()
432 rings[1] = sock_fanout_open_ring(fds[1]); in test_datapath()
435 sock_fanout_read(fds, rings, expect0); in test_datapath()
440 ret = sock_fanout_read(fds, rings, expect1); in test_datapath()
445 ret |= sock_fanout_read(fds, rings, expect2); in test_datapath()
454 close(fds[1]) || close(fds[0])) { in test_datapath()