From patchwork Wed Dec 29 14:51:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 12700984 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9EF1CC433EF for ; Wed, 29 Dec 2021 14:51:44 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 5BFF83AD59A; Wed, 29 Dec 2021 06:51:41 -0800 (PST) Received: from smtp4.ccs.ornl.gov (smtp4.ccs.ornl.gov [160.91.203.40]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id AF73D3AD4FC for ; Wed, 29 Dec 2021 06:51:32 -0800 (PST) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp4.ccs.ornl.gov (Postfix) with ESMTP id 9C2311006F13; Wed, 29 Dec 2021 09:51:28 -0500 (EST) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id 977DAD9E70; Wed, 29 Dec 2021 09:51:28 -0500 (EST) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Wed, 29 Dec 2021 09:51:23 -0500 Message-Id: <1640789487-22279-10-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1640789487-22279-1-git-send-email-jsimmons@infradead.org> References: <1640789487-22279-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 09/13] lnet: socklnd: expect two control connections maximum X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Serguei Smirnov , Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" From: Serguei Smirnov 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. Fixes: 511ace4a ("lnet: socklnd: add conns_per_peer parameter") WC-bug-id: https://jira.whamcloud.com/browse/LU-15137 Lustre-commit: ee9a03d8308c5918a ("LU-15137 socklnd: expect two control connections maximum") Signed-off-by: Serguei Smirnov Reviewed-on: https://review.whamcloud.com/45461 Reviewed-by: Andreas Dilger Reviewed-by: Amir Shehata Signed-off-by: James Simmons --- net/lnet/klnds/socklnd/socklnd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/lnet/klnds/socklnd/socklnd.h b/net/lnet/klnds/socklnd/socklnd.h index fe1bc7d..4607ef7 100644 --- a/net/lnet/klnds/socklnd/socklnd.h +++ b/net/lnet/klnds/socklnd/socklnd.h @@ -397,7 +397,7 @@ struct ksock_conn_cb { * 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