From patchwork Mon Aug 3 17:03:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever III X-Patchwork-Id: 6931371 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8E8189F358 for ; Mon, 3 Aug 2015 17:03:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 241BB203A0 for ; Mon, 3 Aug 2015 17:03:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 31C4320646 for ; Mon, 3 Aug 2015 17:03:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753195AbbHCRDQ (ORCPT ); Mon, 3 Aug 2015 13:03:16 -0400 Received: from mail-qg0-f48.google.com ([209.85.192.48]:34779 "EHLO mail-qg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754637AbbHCRDO (ORCPT ); Mon, 3 Aug 2015 13:03:14 -0400 Received: by qgeu79 with SMTP id u79so93191686qge.1; Mon, 03 Aug 2015 10:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:from:to:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=X0kgKyKaT4wNQyVB+zHIHcf2uq2+8vQZtxwmS+woyMU=; b=Ny63+qEFcPhslb7WxBxF38B4DLUZZ9AavuVsTGr9X6OccqS1WXg5Hm5ULK+aeiDpv8 yj6EDilASmzqTI9L1mEc0rI5Ky2ObaBf8oAZFrouRMASZSyQM89Cj84DFEpwacN57zTS zP/uRSd9tOlW1msvInd1xs23boNhPZKSWf/IBQqNCKxNm9kfM4KYiG0A2fdo509TZx8X do97bgGUs8OQkH4jv0eamxtipAibSAVt+QUrCCJ2WfP4sMFeuLEPqg6ZfHCfKLLJ5VDV cSBFrUGfYvrR26k82jO2KNj0csAMDUyGe/eOqv+JXsYeZW8POiS3xRyLCTRVPNz5J/xh 0VpQ== X-Received: by 10.140.134.137 with SMTP id 131mr27093035qhg.21.1438621393283; Mon, 03 Aug 2015 10:03:13 -0700 (PDT) Received: from manet.1015granger.net ([2604:8800:100:81fc:82ee:73ff:fe43:d64f]) by smtp.gmail.com with ESMTPSA id o100sm3186790qko.49.2015.08.03.10.03.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2015 10:03:12 -0700 (PDT) Subject: [PATCH v4 04/16] xprtrdma: Don't fall back to PHYSICAL memory registration From: Chuck Lever To: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org Date: Mon, 03 Aug 2015 13:03:09 -0400 Message-ID: <20150803170309.9115.44522.stgit@manet.1015granger.net> In-Reply-To: <20150803165807.9115.23842.stgit@manet.1015granger.net> References: <20150803165807.9115.23842.stgit@manet.1015granger.net> User-Agent: StGit/0.17.1-3-g7d0f MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP PHYSICAL memory registration uses a single rkey for all of the client's memory, thus is insecure. It is still useful in some cases for testing. Retain the ability to select PHYSICAL memory registration capability via /proc/sys/sunrpc/rdma_memreg_strategy, but don't fall back to it if the HCA does not support FRWR or FMR. This means amso1100 no longer works out of the box with NFS/RDMA. When using amso1100 HCAs, set the memreg_strategy sysctl to 6 before performing NFS/RDMA mounts. Signed-off-by: Chuck Lever Tested-by: Devesh Sharma Reviewed-by: Christoph Hellwig --- net/sunrpc/xprtrdma/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 891c4ed..1065808 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -539,7 +539,7 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg) if (!ia->ri_device->alloc_fmr) { dprintk("RPC: %s: MTHCAFMR registration " "not supported by HCA\n", __func__); - memreg = RPCRDMA_ALLPHYSICAL; + goto out3; } }