From patchwork Mon Jul 20 19:03:02 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: 6829871 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 450AD9F38B for ; Mon, 20 Jul 2015 19:03:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 62FEC2037C for ; Mon, 20 Jul 2015 19:03:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D7DBF2037F for ; Mon, 20 Jul 2015 19:03:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755281AbbGTTDH (ORCPT ); Mon, 20 Jul 2015 15:03:07 -0400 Received: from mail-qg0-f54.google.com ([209.85.192.54]:36089 "EHLO mail-qg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752578AbbGTTDF (ORCPT ); Mon, 20 Jul 2015 15:03:05 -0400 Received: by qgy5 with SMTP id 5so77196698qgy.3; Mon, 20 Jul 2015 12:03:04 -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=ORA9nOnQasEue+hhjxneGhBwlATkkZ9xHOUiAvUNjeU=; b=FFFLOJQBvDfrpR+9FLZo7M2P8QimBeeLArZV1499sbtjPnzP2GCQgjMJDXd8u1M/Up BM0vDiEsdaWze4bzSjnJ3rFN1tySkNAxUKa+WWk5szXJ3jkm0g2lGMIVC3CIrHu5YGa+ 45hc8yABhKnJQdBikWhcsyTr8Zu2QRoYj7Mi48PO8ES/PUtwtEEhCiEJ5wd3L/+pEvSM FtESKbHZTqlTL9UcxszlgXit3Qj2j1hAbUFd2iOQzrHlOXa+uEnFcH7J1w315JW6Huiu aaYTehrbTLK8HbNl+dkc8BeQGnVhslUi9MIRfiN5it9UG5JBhWiXBIRS6vWHiwdoyeTd yEhg== X-Received: by 10.140.239.136 with SMTP id k130mr43889072qhc.90.1437418984393; Mon, 20 Jul 2015 12:03:04 -0700 (PDT) Received: from manet.1015granger.net ([2604:8800:100:81fc:82ee:73ff:fe43:d64f]) by smtp.gmail.com with ESMTPSA id n6sm11336835qhb.16.2015.07.20.12.03.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jul 2015 12:03:03 -0700 (PDT) Subject: [PATCH v3 04/15] 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, 20 Jul 2015 15:03:02 -0400 Message-ID: <20150720190302.10997.86410.stgit@manet.1015granger.net> In-Reply-To: <20150720185624.10997.51574.stgit@manet.1015granger.net> References: <20150720185624.10997.51574.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=-8.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; } }