From patchwork Fri Jun 16 15:22:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever III X-Patchwork-Id: 9792069 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A698660325 for ; Fri, 16 Jun 2017 15:22:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CFDE28646 for ; Fri, 16 Jun 2017 15:22:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 920F22864C; Fri, 16 Jun 2017 15:22:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F291728646 for ; Fri, 16 Jun 2017 15:22:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753338AbdFPPWd (ORCPT ); Fri, 16 Jun 2017 11:22:33 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:35678 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753322AbdFPPWc (ORCPT ); Fri, 16 Jun 2017 11:22:32 -0400 Received: by mail-it0-f66.google.com with SMTP id f20so5400047itb.2; Fri, 16 Jun 2017 08:22:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=052UduebrT+hjyr5H6ksE9ga2LCPRuGopnvn/IAn96M=; b=Toq3m9YaScWB2w/cnIDuFO0T8xfenAHXzS+sJCMwZ+g5bGf4BFewmatBVQ6XL3PAjm bC+4jzpZr8Va+1k77QgMkxeGV5ITCbhpIakPoGsG5UxeHvlq/Q1LMVz7cR73qRA6ojWx xDxXb7bL3739jDjmhdqBv0OrO0HdFXT/Els4WPEjeUgp6GoJZIRKL16Usr+oflGhHHJ2 Z4d1NXakEWpdPWn+Yunzd6Cj364Gryu1o/FC67DUR+8aHNodkeivX140CFyPqkebwkak 8jTwpG8fZoFCDe/6ZMyDK4QkwaetO9EJeaj78lWggb40ABMJx4mBXdG3Jqnt4sldEH3f LGgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=052UduebrT+hjyr5H6ksE9ga2LCPRuGopnvn/IAn96M=; b=EfgTuxGXzRGAxRSNDoXckJX5XBHWUZ1l6OgM2dABHwnwhTW8kYWch0q8mhcoJhJAHB CEs+qiESC9p9EsD0pyhou+AIGui8s07SH+cbrDFJ5ZtFthPukTcDhM2C2lEI6LQ7ZARD dmaJaxqam67K4YyA9wJDY3e4SS2x30dbygPjO0l3zDrEBVhD8VVrFj3jKPrlDRcqKHMC pE/s6jtDhoWdYbHUBa6LzEFoQof/tjXZR0JE+ZWljURBnhugefR5vl8On9MI0I/UA53N 9fyeLm/gMN6RXgxcnx81z/FvbxzzX2r+CoUJh5RFV/9qP4E42CL3QqL4EYvZ/IBW00Ho mjow== X-Gm-Message-State: AKS2vOylb4uJdWlSBPE4EM9vTMyENMYIF0lV3ctZMoGObRvrtrHxwmIz 3541rlX6z5pd9fay X-Received: by 10.36.70.66 with SMTP id j63mr11450574itb.6.1497626551713; Fri, 16 Jun 2017 08:22:31 -0700 (PDT) Received: from klimt.1015granger.net (c-68-46-169-226.hsd1.mi.comcast.net. [68.46.169.226]) by smtp.gmail.com with ESMTPSA id d192sm1543791itd.31.2017.06.16.08.22.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jun 2017 08:22:31 -0700 (PDT) Subject: [PATCH v2 16/19] svcrdma: Clean up after converting svc_rdma_recvfrom to rdma_rw API From: Chuck Lever To: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org Date: Fri, 16 Jun 2017 11:22:30 -0400 Message-ID: <20170616152230.14210.77568.stgit@klimt.1015granger.net> In-Reply-To: <20170616151535.14210.34926.stgit@klimt.1015granger.net> References: <20170616151535.14210.34926.stgit@klimt.1015granger.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Clean up: Registration mode details are now handled by the rdma_rw API, and thus can be removed from svcrdma. Signed-off-by: Chuck Lever --- include/linux/sunrpc/svc_rdma.h | 4 --- net/sunrpc/xprtrdma/svc_rdma_transport.c | 39 +++--------------------------- 2 files changed, 4 insertions(+), 39 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" 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/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index fd7775f..995c6fe 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h @@ -90,9 +90,6 @@ struct svc_rdma_op_ctxt { struct page *pages[RPCSVC_MAXPAGES]; }; -#define SVCRDMA_DEVCAP_FAST_REG 1 /* fast mr registration */ -#define SVCRDMA_DEVCAP_READ_W_INV 2 /* read w/ invalidate */ - struct svcxprt_rdma { struct svc_xprt sc_xprt; /* SVC transport structure */ struct rdma_cm_id *sc_cm_id; /* RDMA connection id */ @@ -123,7 +120,6 @@ struct svcxprt_rdma { struct ib_qp *sc_qp; struct ib_cq *sc_rq_cq; struct ib_cq *sc_sq_cq; - u32 sc_dev_caps; /* distilled device caps */ spinlock_t sc_lock; /* transport lock */ diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 75bd11f..e660d49 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c @@ -783,7 +783,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) memset(&qp_attr, 0, sizeof qp_attr); qp_attr.event_handler = qp_event_handler; qp_attr.qp_context = &newxprt->sc_xprt; - qp_attr.port_num = newxprt->sc_cm_id->port_num; + qp_attr.port_num = newxprt->sc_port_num; qp_attr.cap.max_rdma_ctxs = newxprt->sc_max_requests; qp_attr.cap.max_send_wr = newxprt->sc_sq_depth; qp_attr.cap.max_recv_wr = newxprt->sc_rq_depth; @@ -807,43 +807,12 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) } newxprt->sc_qp = newxprt->sc_cm_id->qp; - /* - * Use the most secure set of MR resources based on the - * transport type and available memory management features in - * the device. Here's the table implemented below: - * - * Fast Global DMA Remote WR - * Reg LKEY MR Access - * Sup'd Sup'd Needed Needed - * - * IWARP N N Y Y - * N Y Y Y - * Y N Y N - * Y Y N - - * - * IB N N Y N - * N Y N - - * Y N Y N - * Y Y N - - * - * NB: iWARP requires remote write access for the data sink - * of an RDMA_READ. IB does not. - */ - if (dev->attrs.device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS) { - newxprt->sc_dev_caps |= SVCRDMA_DEVCAP_FAST_REG; - } else + if (!(dev->attrs.device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS)) newxprt->sc_snd_w_inv = false; - - /* - * Determine if a DMA MR is required and if so, what privs are required - */ - if (!rdma_protocol_iwarp(dev, newxprt->sc_cm_id->port_num) && - !rdma_ib_or_roce(dev, newxprt->sc_cm_id->port_num)) + if (!rdma_protocol_iwarp(dev, newxprt->sc_port_num) && + !rdma_ib_or_roce(dev, newxprt->sc_port_num)) goto errout; - if (rdma_protocol_iwarp(dev, newxprt->sc_cm_id->port_num)) - newxprt->sc_dev_caps |= SVCRDMA_DEVCAP_READ_W_INV; - /* Post receive buffers */ for (i = 0; i < newxprt->sc_max_requests; i++) { ret = svc_rdma_post_recv(newxprt, GFP_KERNEL);