From 777c153393baea1032cdf84026669d547fac6b0f Mon Sep 17 00:00:00 2001 From: Nicolas Morey-Chaisemartin Date: Wed, 30 May 2018 09:00:05 -0700 Subject: [PATCH] ucm, mcm: fix backlog parameter for socket 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 --- dapl/openib_mcm/device.c | 2 +- dapl/openib_ucm/device.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dapl/openib_mcm/device.c b/dapl/openib_mcm/device.c index 2e30221..5ea2561 100644 --- a/dapl/openib_mcm/device.c +++ b/dapl/openib_mcm/device.c @@ -59,7 +59,7 @@ static int32_t create_os_signal(IN DAPL_HCA * hca_ptr) if (ret) goto err1; - ret = listen(listen_socket, 0); + ret = listen(listen_socket, 1); if (ret) goto err1; diff --git a/dapl/openib_ucm/device.c b/dapl/openib_ucm/device.c index 11f7334..9e25783 100644 --- a/dapl/openib_ucm/device.c +++ b/dapl/openib_ucm/device.c @@ -92,7 +92,7 @@ static int32_t create_os_signal(IN DAPL_HCA * hca_ptr) if (ret) goto err1; - ret = listen(listen_socket, 0); + ret = listen(listen_socket, 1); if (ret) goto err1; -- 2.41.0