Using listen(, 0) forces a synchronization barrier between connect and accept if net.ipv4.tcp_syncookies.
As this is done by a single thread, it causes connect to timeout with a similar message:
open_hca: failed to init cr pipe - Connection timed out
Replace with listen(, 1) so the kernel can accept the connection itself and remove the synchronisation
point.
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
- ret = listen(listen_socket, 0);
+ ret = listen(listen_socket, 1);
- ret = listen(listen_socket, 0);
+ ret = listen(listen_socket, 1);