]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
ucm, mcm: fix backlog parameter for socket master
authorNicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.de>
Wed, 30 May 2018 16:00:05 +0000 (09:00 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Wed, 30 May 2018 16:00:05 +0000 (09:00 -0700)
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>
dapl/openib_mcm/device.c
dapl/openib_ucm/device.c

index 2e30221ac2d2635094583227036af59165f99cbb..5ea25615f683436d1f0ddbee6a20afa892cb2dad 100644 (file)
@@ -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;
 
index 11f7334ec34808d16682bdf8e60c56c3c070d894..9e257835f44b05a96df2f83ae8ad1c1850a569db 100644 (file)
@@ -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;