Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp103259rbe; Wed, 28 Feb 2024 13:41:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWPbAy2UNMadozhaLtWsMf6Qep/AtTDf7TuuB2PcxwBJjh02ewCbxcunARTso5OP6Fgtz7FbrLCbJHZtJXobGkVMUmYgvT5ROnHaMMoHA== X-Google-Smtp-Source: AGHT+IFfvS/RZIE1wfgabeRKGB8284M8voztqiVjm1wXgNHHhjLWGfgv8tvtfTx7G8ctwiw4UCKd X-Received: by 2002:a05:620a:1108:b0:787:7cc6:4423 with SMTP id o8-20020a05620a110800b007877cc64423mr337715qkk.36.1709156512856; Wed, 28 Feb 2024 13:41:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709156512; cv=pass; d=google.com; s=arc-20160816; b=zQfVBZ34mfYR4EQ+oyjMfbQgufTv/iOkzdQL+AnuIKvV/s8m4tYX06O6jrQ93PGBHO tyER1SA0qxXtgkXZSqc7+BoBawacm/VA+ZPyge4LoxoqaxDNEBqPVsmDIWXeShKuul1l WZuP03Yc23o0wWoWi5VrgSMWgpJSWy/5+emZHGF9bS/BBQMA5rWfRncMQjYls56ezFJv ZZ2M1hHlF8jQZde/c7/Cmsrrc6WlMCAktLoud98aiCiMBYtCI4mewoWqB5hmgnT75yT3 LeeAgIg8kg+og7yzRmoPhMGFRUOYEKHfNNdjKTDQVHV42Hj9D1sWyBFh1nlZBLw50oxI bu4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=KLeccaY3Ra8dN/D4m+6hR4EpXeATYyLHwNe7zuk4h7k=; fh=Mys3y4MwsHRytUQMpdfGBn3oGRYLcLloxNwkFYMYMmg=; b=vC8GAJZ2CL1eLRYFgVSNQeH4I5NCrfKnAWhjJKu4CQ05AW8Zbo7LZDJiHsHXY9vVJf 7RxjZrSdkg7ZuNKcfY8UaxwvIhbv9nrVqL9A9R5ZSFO8coq3T3jNmYr2IwOhwSlNwEfP mT8M2Et2EnmUlMBTfASFUEVqirMSy1MsngJl4PdF2DyBON465a7T+PjyyjjySKuv7xc8 wVtgSiFhkPg30WD+xdUbcDh00JCBPalS324XonmqXsM6/OevxXvqc6z4T/aMmot+JMG2 nQBoNRuMcAOPdiq67cb7OVkwkOgc56/xbEYpR4k6/H30AMa1sa+pYZDQyl4BiOmR2e/c AwAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="WQX/eVmu"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-2116-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2116-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l17-20020a05620a28d100b00787b8484d71si56232qkp.399.2024.02.28.13.41.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 13:41:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2116-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="WQX/eVmu"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-2116-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2116-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 876FE1C213D6 for ; Wed, 28 Feb 2024 21:41:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F37F770023; Wed, 28 Feb 2024 21:41:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WQX/eVmu" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CEE4A53E2D for ; Wed, 28 Feb 2024 21:41:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709156510; cv=none; b=fsH7XGSCL3Mq0hfmmemZuKtFDyydGD4b8GHLXv33zsij1ai9pVHy+zm003kK0pF4R4A9exWoVQuNJXJEcAgAU1CLMK8q2OWxu0u69wWPbRCAlmlSQXaNNH2wJI62dUanVmW0bhLOIK/DmGf5t4P/iyipy7Pp6c5Gs3JhSOYka0o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709156510; c=relaxed/simple; bh=ZxpvFg7HMptsju2aZrlCwuTRIS1z8f2IlOPsnvowJo8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=rXeXu6cxLlHEgz1dLH5GxfeaYf/6OsC8gbR8vfsRKGDclE2/na37iTzYCsE817lwn+nTIK9ZHbhjT2yOwukMC+PlSSQKRDB9VnbNtgdT0fn+jwKF9brpWFUTSwS/SzhvswDAYLyrROufLP9VrcmgX/lWaWDX4t964aulFbMJp/8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WQX/eVmu; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 217E7C433C7 for ; Wed, 28 Feb 2024 21:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709156510; bh=ZxpvFg7HMptsju2aZrlCwuTRIS1z8f2IlOPsnvowJo8=; h=From:To:Subject:Date:From; b=WQX/eVmuAkSzhN1OufWcuvZ+sjz2hXIZe5Zmai1lsbXiLCth8qnq5Q4dRkjHK4m/P 5xaRr2qIZXwEQyl01BNKJmxwWAxz9RPEYAKMfOXtt7WWHUR3cZIU3OWS1ph7zHoKu1 6inv0Wlt4Igu5tqHkB71vYmVX3WKL0j32+aKTMR1ikRWfFMFjLiBFrf0+sdGwXiiO2 NFKyvsa9xo6jI+lzmHAUPHqoy4bobOOBVil1cstpH/iJrz/4ltqpcMm2y8uqSUvE1J 1pqDvUYCpPc4DaSnmjy9c/BwVtXlr5s5uD3D4XfZk5xFJ2tkyzfPr3IYDai7115pIY KjltYEi9noxwQ== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH] NFS: enable nconnect for RDMA Date: Wed, 28 Feb 2024 16:35:23 -0500 Message-ID: <20240228213523.35819-1-trondmy@kernel.org> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Trond Myklebust It appears that in certain cases, RDMA capable transports can benefit from the ability to establish multiple connections to increase their throughput. This patch therefore enables the use of the "nconnect" mount option for those use cases. Signed-off-by: Trond Myklebust --- fs/nfs/nfs3client.c | 1 + fs/nfs/nfs4client.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/fs/nfs/nfs3client.c b/fs/nfs/nfs3client.c index 674c012868b1..b0c8a39c2bbd 100644 --- a/fs/nfs/nfs3client.c +++ b/fs/nfs/nfs3client.c @@ -111,6 +111,7 @@ struct nfs_client *nfs3_set_ds_client(struct nfs_server *mds_srv, cl_init.hostname = buf; switch (ds_proto) { + case XPRT_TRANSPORT_RDMA: case XPRT_TRANSPORT_TCP: case XPRT_TRANSPORT_TCP_TLS: if (mds_clp->cl_nconnect > 1) diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 11e3a285594c..84573df5cf5a 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -924,6 +924,7 @@ static int nfs4_set_client(struct nfs_server *server, else cl_init.max_connect = max_connect; switch (proto) { + case XPRT_TRANSPORT_RDMA: case XPRT_TRANSPORT_TCP: case XPRT_TRANSPORT_TCP_TLS: cl_init.nconnect = nconnect; @@ -1000,6 +1001,7 @@ struct nfs_client *nfs4_set_ds_client(struct nfs_server *mds_srv, cl_init.hostname = buf; switch (ds_proto) { + case XPRT_TRANSPORT_RDMA: case XPRT_TRANSPORT_TCP: case XPRT_TRANSPORT_TCP_TLS: if (mds_clp->cl_nconnect > 1) { -- 2.44.0