Whamcloud - gitweb
LU-15137 socklnd: expect two control connections maximum 61/45461/4
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Thu, 4 Nov 2021 18:35:43 +0000 (11:35 -0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Dec 2021 07:19:03 +0000 (07:19 +0000)
As a result of connecting to ourselves, e.g. pinging own nid,
two control type connections are established vs. just one
in case of connecting externally.
Fix the control connection counter to be able to handle that.

Test-Parameters: trivial testlist=sanity-lnet
Fixes: 71b2476e ("LU-12815 socklnd: add conns_per_peer parameter")
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: Idce01d81e3924226b5b163d2472cbcd4f6eb5819
Reviewed-on: https://review.whamcloud.com/45461
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
lnet/klnds/socklnd/socklnd.h

index 00bacf3..7bd050a 100644 (file)
@@ -379,7 +379,7 @@ struct ksock_conn_cb {
        unsigned int            ksnr_connecting:1;/* connection in progress */
        unsigned int            ksnr_connected:4;/* connections by type */
        unsigned int            ksnr_deleted:1; /* been removed from peer_ni? */
-       unsigned int            ksnr_ctrl_conn_count:1; /* # conns by type */
+       unsigned int            ksnr_ctrl_conn_count:2; /* # conns by type */
        unsigned int            ksnr_blki_conn_count:8;
        unsigned int            ksnr_blko_conn_count:8;
        int                     ksnr_conn_count;/* total # conns for this cb */