From patchwork Tue Jan 17 22:00:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9522007 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 6E8FC60244 for ; Tue, 17 Jan 2017 22:18:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54351284D1 for ; Tue, 17 Jan 2017 22:18:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46E2728618; Tue, 17 Jan 2017 22:18:01 +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, T_TVD_MIME_EPI autolearn=unavailable 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 A58CA284D1 for ; Tue, 17 Jan 2017 22:18:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751106AbdAQWR5 (ORCPT ); Tue, 17 Jan 2017 17:17:57 -0500 Received: from mail-co1nam03on0080.outbound.protection.outlook.com ([104.47.40.80]:28379 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751015AbdAQWRz (ORCPT ); Tue, 17 Jan 2017 17:17:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=oRrTQFDps3jW72UnHgc75VjsSita5Xn1/aj/G1BWDMc=; b=XrYQHnZujyrxXhDdD4HU7WCEb6mNr3b5eqJum9ewNRoxswZrBP7vnjEUuSI7VOzNhbPWF00ppAu2W/j3LOdsUec7/J75H9b576u7Y5Fom69uVkWUe4cQoDSus3Z8vQzWJN4kJ6dQU+NCbK4gYt2HmvQRnAkEQosjwsZvduh8GZE= Received: from BY1PR0201CA0011.namprd02.prod.outlook.com (10.160.191.149) by SN1PR02MB1424.namprd02.prod.outlook.com (10.162.0.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Tue, 17 Jan 2017 22:00:09 +0000 Received: from BL2FFO11FD049.protection.gbl (2a01:111:f400:7c09::142) by BY1PR0201CA0011.outlook.office365.com (2a01:111:e400:4814::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13 via Frontend Transport; Tue, 17 Jan 2017 22:00:08 +0000 Authentication-Results: spf=pass (sender IP is 74.221.232.54) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 74.221.232.54 as permitted sender) receiver=protection.outlook.com; client-ip=74.221.232.54; helo=sacsmgep14.sandisk.com; Received: from sacsmgep14.sandisk.com (74.221.232.54) by BL2FFO11FD049.mail.protection.outlook.com (10.173.161.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.8 via Frontend Transport; Tue, 17 Jan 2017 22:00:08 +0000 X-AuditID: ac1c2133-0afff70000013ebf-01-587f0e96857f Received: from SACHUBIP02.sdcorp.global.sandisk.com (Unknown_Domain [172.28.1.254]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 38.5A.16063.69E0F785; Tue, 17 Jan 2017 22:43:37 -0800 (PST) Received: from SACCASIP04.sdcorp.global.sandisk.com (10.181.10.113) by SACHUBIP02.sdcorp.global.sandisk.com (10.181.10.104) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 17 Jan 2017 14:00:01 -0800 Received: from ULS-OP-MBXIP03.sdcorp.global.sandisk.com ([fe80::f9ec:1e1b:1439:62d8]) by SACCASIP04.sdcorp.global.sandisk.com ([::1]) with mapi id 14.03.0319.002; Tue, 17 Jan 2017 14:00:00 -0800 From: Bart Van Assche To: "alex.estrin@intel.com" , "dledford@redhat.com" CC: "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "gregkh@linuxfoundation.org" Subject: Re: [PATCH v2 00/26] IB: Optimize DMA mapping Thread-Topic: [PATCH v2 00/26] IB: Optimize DMA mapping Thread-Index: AQHScQ0MZXDV5J9vTE26AE7ZkE9lDA== Date: Tue, 17 Jan 2017 22:00:00 +0000 Message-ID: <1484690386.2729.8.camel@sandisk.com> References: <20170112190718.6728-1-bart.vanassche@sandisk.com> <1484338667.2679.15.camel@sandisk.com> <1484344759.2679.26.camel@sandisk.com> <1484689709.2729.6.camel@sandisk.com> In-Reply-To: <1484689709.2729.6.camel@sandisk.com> Accept-Language: nl-NL, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [172.28.1.254] MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42JZI8P4T3cmX32EwcOZ+hYXnn5nsnh5/gOr RfPi9WwWl3fNYbN4dqiXxYHVY/Gel0we++euYfd4v+8qm8fnTXIBLFFcNimpOZllqUX6dglc Ge8PXmEsOGRcsXXxdpYGxr0GXYwcHBICJhIfPmV1MXJxCAksYZI4PW0OI4RznlHi/Od+Zgjn GKPE486N7F2MnBxsAkYSsyfsYQGxRQSSJFafeAdWxCywm1Hi+4Z9YEXCAmYST/d+ZgZZISJg LvFtYThEvZ7Ey4PXWEFsFgFVibM7WxlBbF4BQ4lfx7tZIJbNYZZ4dv4wG0gvJ9CyBY/LQExG AVmJltfcIOXMAuISt57MZwKxJQREJB5ePM0GYYtKvHz8jxXCVpD4vOIfG0R9gMTs6VvZIVYJ Spyc+QTsfCEBdYmTd9YyT2AUm4Vk7CwkLbOQtEDE9SRuTJ3CBmFbSWx8dQoqri2xbOFrZgg7 RWJN40OoeIjE86WzGWeBQ+geo8S19weYYJp3r22HalCUmNL9kH0BI/cqRrHixOTi3PTUAkMT veLEvJTM4my95PzcTYzg1KBovIPx3wb3Q4wCHIxKPLwdE+sihFgTy4orcw8xqgANerRh9QVG KZa8/LxUJRHehkagNG9KYmVValF+fFFpTmrxIUZpDhYlcV75A7tDhQTSE0tSs1NTC1KLYLJM HJxSDYzLD5jmFp1643W17OTHt8tVz7Sar+SrOTA5Kf7QpfiLx9raC1rrpv7w9hU3sf8V+eVN VYkyZ8a8Bl7pf2KBTxh975QZinxeu0i+6YDribdBIRUbJPYuzFx9JOBb2ubmnomiZVxvLd6y Ll8exFhXofH45g2Z4q2HeLwE34tbZO84+KnqTmjOHS0lluKMREMt5qLiRAAjjWjWFQMAAA== X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:74.221.232.54; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39450400003)(39860400002)(39850400002)(39410400002)(39840400002)(2980300002)(438002)(24454002)(199003)(189002)(377424004)(5000100001)(4610100001)(5890100001)(5250100002)(2501003)(229853002)(2906002)(99936001)(38730400001)(54356999)(2900100001)(36756003)(76176999)(106466001)(512934002)(50986999)(106116001)(189998001)(5001770100001)(68736007)(356003)(53936002)(103116003)(7736002)(8676002)(8936002)(81156014)(81166006)(305945005)(84326002)(4326007)(626004)(2950100002)(92566002)(6116002)(568964002)(2476003)(69596002)(2270400002)(33646002)(86362001)(102836003)(3846002)(30436002)(93886004)(5660300001)(54906002)(97736004)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR02MB1424; H:sacsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD049; 1:Tqu133U/r/YwjoxgPSqt78+5Svv6JLB0iWhj1ofHnSmvYai2C+u5thPXGVGfaBQuFbHN6T6gsM4H5GjVf1rVDmj7+Tc6gTkW/G66FIwH3ElQBny8opuYumKr4r/3QaG4wLOYayxYOFE8CkXDBLKpcyytNSpnEVpEXFrmVLok7p23KFMgZ7jIaWFvLRbBBJgIpUvrY5U2Ln7kz8uM6YDkAs8vyFeIZo7uE6QRSZxZqfC3krv3KFP/xOufX6I0WZwej1Cr3frGOOqqScv3QLje2C05cps0WjgqQiUtBTwUQMxchuDzQC/e5YTbQ0pQCNPsNQNHpe/Q0GfVfd+TgA9jl/rWhXETvQZaKVl2glEfLDwvKwKeFT6LphNrbLW98TwcvQKoiEFV/rfSbPzC+o+Nn48ZTvlx3yvSk4CM4AUDPNXwpoFQBfER9z2WYQ+/PHWw/pUB79cbl/ivIGrccY4We2fvm8m1tQgP6j3PHApHIemK0qpel8MzoZCiQciiBJM5zfKPPDg6hqAjdFWTrJnCFW5Q6BetjBLq6W+ZNZCpSALcpTYVz5ZJzLtpKJY1j2kTuM9bsU1PdMXv+3iCrRcRQ3/fYRVZON3ilUoecc3DTDM= X-MS-Office365-Filtering-Correlation-Id: b548aa84-ab38-4f5b-9f17-08d43f2433c6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:SN1PR02MB1424; X-Microsoft-Exchange-Diagnostics: 1; SN1PR02MB1424; 3:uCTH4fhSypaRU9OEX1FGRsTEs11lp/SW+0luqYO9mXXumsSwdFCIj9ZDK6F+WMBMo5gXDz4LWOVNU6Y6YVwhDJR5/S74vsoYHcG4E1d7u1nDtZt3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X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415395)(6040375)(601004)(2401047)(13023025)(13015025)(13017025)(13018025)(13024025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(6072148); SRVR:SN1PR02MB1424; BCL:0; PCL:0; RULEID:; SRVR:SN1PR02MB1424; X-Microsoft-Exchange-Diagnostics: 1; SN1PR02MB1424; 4:WjjdiS8/ixVs6W+z89rA2mOLFPLGgIKb/DatM++kPpkZCutgrSwYnL2zlvfuVse+sFdGFMmv1HLhPTc9rGH3nWhZW6q00igbBOUDW7F2MVI9bWo5Qfz+1/8kGjL1Nw8OaArxDJXZAMOVyI/mZM8BbMjsP4UtjHiaUj58DtVBA8HZZ1LRPoXihHlUv5zD1EoQxLDQbgU9nygSzlX8di6w/1lOMdYVUWxvm17bnqqLPfmIP79fWYoC3t8pvN0rPkxqe8yjx32+Bcsf1L56ynf/5JfQyWqyJQrnPFrQJllbn4/5n1fL88zlX1JOekpI9i6JtTBA+szQKAhZqj6CalcBeyXWLzTKcctp+yccFHEM6Tfp+faahJipD0IAP9QNY9zznbP1uaB4DAHTQxjbyna0EwecdBp0YPRl1CtbGmpp/TrWaRTs+Flui8NJmqJqyTWdqU2x65ojY9jdAN5ZWI3sCzup4vKB/Lj38VcWC0W4tkjahkmwzeQ7XYTz3HyXuthj0o9lV1CZqhPgPrpYnMx2RJ8U5n8aqflfFYJPL0dUc/SgwoPMOohIWcYbycPlRs+oS2slAwb2vNa4nYHdvop5oxwfLd+93p71Rl/RoxdwaZ2C+417M+G+CUNsIiH2FuBKnFqPbVQSHcknpmlApyu5LxgbynSz7CEm+6yFH0LcwZYWTyvOL/no0WgHcfF18Lrvlw5PU2gx2c9hs7AnG5R1muAGmzpxttZg0dckdch9ANtwEV34gNWw0xewvW+58p52 X-Forefront-PRVS: 01901B3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agN90J9Mhcklnhxjw5yVCMcItjjGPeP5bg== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2017 22:00:08.0806 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[74.221.232.54]; Helo=[sacsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR02MB1424 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 2017-01-17 at 13:48 -0800, Bart Van Assche wrote: > On Sat, 2017-01-14 at 02:05 +0000, Estrin, Alex wrote: > > [ ... ] > > please see hfi1/verbs.c @ hfi1_register_ib_device() > > [ ... ] > > Hello Alex, > > I think I figured out what I did wrong: both the hfi1 and the qib drivers need two > sets of DMA mapping operations. ULPs have to use &dma_virt_ops and the SDMA code > has to use the PCIe DMA mapping operations. My patch series made the SDMA code use > dma_virt_ops and that's wrong. The attached patch should fix this. Unfortunately I > do not have access to a hfi1 or qib test setup. Can you help me by testing the > attached patch on top of the already posted patches? Hello Alex, The wrong version of my patch was attached to previous e-mail. Sorry for this. Please use the patch attached to this e-mail. Thanks, Bart. From a462991fadfd1c350ecb41635f1157e227e133ef Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 17 Jan 2017 13:22:35 -0800 Subject: [PATCH] hfi1, qib, rdmavt [v2]: Use proper DMA mapping operations Make users of the hfi1 and qib drivers use dma_virt_ops. Use the PCIe mapping operations for SDMA. Make sure that the rdmavt code does not change the PCIe DMA mapping operations pointer into &dma_virt_ops. --- drivers/infiniband/hw/hfi1/mad.c | 2 +- drivers/infiniband/hw/hfi1/verbs.c | 1 - drivers/infiniband/hw/qib/qib_verbs.c | 1 - drivers/infiniband/sw/rdmavt/vt.c | 2 ++ include/rdma/rdma_vt.h | 8 ++++++++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c index 6e595afca24c..041d503c399b 100644 --- a/drivers/infiniband/hw/hfi1/mad.c +++ b/drivers/infiniband/hw/hfi1/mad.c @@ -4406,7 +4406,7 @@ int hfi1_process_mad(struct ib_device *ibdev, int mad_flags, u8 port, switch (in_mad->base_version) { case OPA_MGMT_BASE_VERSION: if (unlikely(in_mad_size != sizeof(struct opa_mad))) { - dev_err(ibdev->dma_device, "invalid in_mad_size\n"); + dev_err(&ibdev->dev, "invalid in_mad_size\n"); return IB_MAD_RESULT_FAILURE; } return hfi1_process_opa_mad(ibdev, mad_flags, port, diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c index 95ed4d6da510..fa0ff3e11597 100644 --- a/drivers/infiniband/hw/hfi1/verbs.c +++ b/drivers/infiniband/hw/hfi1/verbs.c @@ -1784,7 +1784,6 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd) strlcpy(ibdev->name + lcpysz, "_%d", IB_DEVICE_NAME_MAX - lcpysz); ibdev->owner = THIS_MODULE; ibdev->phys_port_cnt = dd->num_pports; - ibdev->dma_device = &dd->pcidev->dev; ibdev->modify_device = modify_device; ibdev->alloc_hw_stats = alloc_hw_stats; ibdev->get_hw_stats = get_hw_stats; diff --git a/drivers/infiniband/hw/qib/qib_verbs.c b/drivers/infiniband/hw/qib/qib_verbs.c index 4b54c0ddd08a..daa28a7b7574 100644 --- a/drivers/infiniband/hw/qib/qib_verbs.c +++ b/drivers/infiniband/hw/qib/qib_verbs.c @@ -1632,7 +1632,6 @@ int qib_register_ib_device(struct qib_devdata *dd) ibdev->owner = THIS_MODULE; ibdev->node_guid = ppd->guid; ibdev->phys_port_cnt = dd->num_pports; - ibdev->dma_device = &dd->pcidev->dev; ibdev->modify_device = qib_modify_device; ibdev->process_mad = qib_process_mad; diff --git a/drivers/infiniband/sw/rdmavt/vt.c b/drivers/infiniband/sw/rdmavt/vt.c index 6a81b179f631..99b3cb39ed67 100644 --- a/drivers/infiniband/sw/rdmavt/vt.c +++ b/drivers/infiniband/sw/rdmavt/vt.c @@ -103,6 +103,8 @@ struct rvt_dev_info *rvt_alloc_device(size_t size, int nports) if (!rdi->ports) ib_dealloc_device(&rdi->ibdev); + rdi->ibdev.dma_device = &rdi->dma_device; + return rdi; } EXPORT_SYMBOL(rvt_alloc_device); diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h index 861e23eaebda..b7259c9b056e 100644 --- a/include/rdma/rdma_vt.h +++ b/include/rdma/rdma_vt.h @@ -339,6 +339,14 @@ struct rvt_driver_provided { struct rvt_dev_info { struct ib_device ibdev; /* Keep this first. Nothing above here */ + /* + * qib and hfi1 use two sets of DMA operations: + * - The DMA operations of the PCIe device for SDMA. + * - dma_virt_ops for users of the qib and hfi1 drivers. + * The only purpose of @dma_device is to provide a struct device that + * provides dma_virt_ops. + */ + struct device dma_device; /* * Prior to calling for registration the driver will be responsible for -- 2.11.0