From patchwork Mon Jul 13 16:30:19 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: 6780371 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2E09DC05AD for ; Mon, 13 Jul 2015 16:30:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5F0652052A for ; Mon, 13 Jul 2015 16:30:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E91820547 for ; Mon, 13 Jul 2015 16:30:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751734AbbGMQaY (ORCPT ); Mon, 13 Jul 2015 12:30:24 -0400 Received: from mail-qg0-f42.google.com ([209.85.192.42]:33687 "EHLO mail-qg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327AbbGMQaX (ORCPT ); Mon, 13 Jul 2015 12:30:23 -0400 Received: by qgef3 with SMTP id f3so108928236qge.0; Mon, 13 Jul 2015 09:30:22 -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=/DcmqvDbB0RtPp7Yih0kR3FKEfIakpD9494x2XdvbCw=; b=YqnozcTdYAZnc2nPviKWojq/Xg1b4YiUstYuHMw2Ike0HDaDNMV7QLhThlivwIiihZ c/xxT1oAp+/Pi7uH+zloNVBOsf3jymgrkxj99Q6+9VdP9C2LSmJMXkAzoTw7l9489flm DF5kNPH747u3H8imEz8YTnRvC1jmyg33g3mU/EuRXkGkh4Hh3+LHdyzx4x+5bE9TU/yA 6nkKRgZbiOaZu8MrfnsnZHtQTHzzOT2Ke8zH036ztvuV16BFi4nCWJYRtYl859dYnqHB sNmLYfMQ6GYSLRCSeLWUzrVUN3lBvB2nzC/z2i4hbs+sR+at7uDdNNY0vBifBhHn289J l5Ew== X-Received: by 10.140.39.17 with SMTP id u17mr11529695qgu.5.1436805022243; Mon, 13 Jul 2015 09:30:22 -0700 (PDT) Received: from manet.1015granger.net ([2604:8800:100:81fc:82ee:73ff:fe43:d64f]) by smtp.gmail.com with ESMTPSA id k85sm10880954qhk.39.2015.07.13.09.30.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jul 2015 09:30:21 -0700 (PDT) Subject: [PATCH v2 04/14] 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, 13 Jul 2015 12:30:19 -0400 Message-ID: <20150713163019.17630.91612.stgit@manet.1015granger.net> In-Reply-To: <20150713160617.17630.97475.stgit@manet.1015granger.net> References: <20150713160617.17630.97475.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.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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. Signed-off-by: Chuck Lever --- 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; } }