From patchwork Fri Dec 8 19:01:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Tan X-Patchwork-Id: 10103181 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 22871602A0 for ; Fri, 8 Dec 2017 19:01:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1218428EA4 for ; Fri, 8 Dec 2017 19:01:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06D1728EAF; Fri, 8 Dec 2017 19:01:44 +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 7AC1628EA4 for ; Fri, 8 Dec 2017 19:01:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752003AbdLHTBm (ORCPT ); Fri, 8 Dec 2017 14:01:42 -0500 Received: from mail-sn1nam01on0082.outbound.protection.outlook.com ([104.47.32.82]:59392 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751268AbdLHTBl (ORCPT ); Fri, 8 Dec 2017 14:01:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onevmw.onmicrosoft.com; s=selector1-vmware-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rpKTXo1f1OPQlZSmjNwQ5myek988MXUBtsf3HIDL07Q=; b=e3V7VTZLKbgrJFjREsZctIGVuW2LMzl+nKj0kKqwsCkLm2APIuZ+7iocvhZZl1kuSzmwrod6H9R4BC+4EHLLM/uGbyT8iDPlh/KM97El0EZ2DbJp3392wh8w6usMF1n5zKfJztJYLD+Z92uie7MfqlCeiYPxp8h4t98PKGOD0ks= Received: from bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com (208.91.1.34) by SN2PR05MB2783.namprd05.prod.outlook.com (2603:10b6:804:16::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.2; Fri, 8 Dec 2017 19:01:39 +0000 Date: Fri, 8 Dec 2017 11:01:18 -0800 From: Bryan Tan To: linux-rdma@vger.kernel.org Subject: [PATCH for-rc 2/6] RDMA/vmw_pvrdma: Call ib_umem_release on destroy QP path Message-ID: <20171208190106.GA32066@bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171208185818.GA28514@bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [208.91.1.34] X-ClientProxiedBy: BN6PR1301CA0030.namprd13.prod.outlook.com (2603:10b6:405:29::43) To SN2PR05MB2783.namprd05.prod.outlook.com (2603:10b6:804:16::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5119a48f-20e4-4865-60b3-08d53e6e1d17 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307); SRVR:SN2PR05MB2783; X-Microsoft-Exchange-Diagnostics: 1; SN2PR05MB2783; 3:SwnHXMvj8w9ExfkPNkSd3wZpJNLCUCCxXN0zmg6jOeWY4Oy6sZTUyWkguaSth9JP6evqwiLGE8ahYZoWTqnd7yaqe6zfdLwiGA47pK6r3EIfTZYtVEq9wKGo98ywqYeE9HnM64Qy4Jta8SW7aGrDkvfrDisPdIJdPC2iC9pz2qP/Qq11cQKTEFMOhzzkIIvAdo4L0z8/uwx2GSdnTIh2SYZSNeydErDm83Y1yhOHUt8YhVeAKx1QWqA7xN2u75pX; 25:z+b0fsoX94UUGAX5s6YwHumckn2sFXIL5PCEHmVlc9bplIL/fzuG+LsrrNQoMdLrMt73cJNeCDXYarGEoaJMev3JGd2r5S4eyD/eUuILNUIz6w/77Y+OmEtO2pMEHuFBCRqdmCEDhwWQmnC28X20PVXToMB9kgLxnrFQoT/FfWd1jTcul2ff1XGSBYMClGQAXFzFJApjHLjdo8B64+yrGkBygP94b/q+t8gAUlclUeR4XYhuqPkibN05po/qEEOPTdE4GDsjMPZMZwTxVF02YvempPisjUMn0COrf4Nzoht79v98VP7yt744OPMmqtQXHTWzrNJv7CIkBX8MwwqVnA==; 31:5W46i7OdLeyd0QDjLBmrCd+Ebu5GpQ6qQTppkgCu4JVenOCnypNnv3mpXpZmOHy1sbzdHS1whO9TOKen8ZP5n2kPECzJnpDKcQzM//VWG2+8GyVWVdLz3/BlrMDV+a527K4CbLdvCh4uUeY1FHDk1A9dZSNRVgKsunqz3Bj1I//dFQUMPAKl6hhjUDeA96n+kOdYFdSxgYX8h1hiMkI0ypjf0fx/+0Nf80ofxGcV/YM= X-MS-TrafficTypeDiagnostic: SN2PR05MB2783: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=bryantan@vmware.com; X-Microsoft-Exchange-Diagnostics: 1; SN2PR05MB2783; 20:JnlvQ+AMSNXMbY0wzMO9G8PmotQbBLEBflmYw55y7//JJUaV7z1YnAHcunwGePcfRAEmUIW1DW38PeTgvtqKcYp6qD0MF6Hx/ZHoYZEQ9+WYABxsZuXsaW6/XJ44Ddvo2HtrG6volqweOUEagFg51kTNxVVxNVJrmNT2N/rvM/D7rFBmdC9hKwKnkBBQaA+81hy04RPdIn6Hvh8Gy0bBzTwToHMiw9WIkCGafvjaNdnzZjqaylsV+IlUE2uSSlNnp4PJTiAqcqnFI6YGfwIaYv1pvjih7HRXN40YuZGy1lH7nIhtzdiVx56O7X8OYuyVLKOJk08Iw/Tx4GA0PG5HnqCnyi6Wim//HQV2N70IO4xkODF4uridp8jTePTrD259rylXqPjuYSF/+bSuElos+6BgdQCCj06iGwzBl4WJhjlaw6+V7MhaUlJModU8ua0Q+nxSQRmabgXW3brAj6Fs6O7kGMcKOutik51uCUCGuQQU3Ytdbin7frqVhKBo/PC+; 4:BbAPApj0PcgzeuFj2IdGJmORn72wqTqTrcgHgMlHvb1LvZMINPhprOSj+MSE9VDM6boV00I7yEeYahIr5lStKwN1GDJbXIXXmQ2CLBCw95jhZ7Mful7L44JYbs/kjCvevBaCJJER8GkeuzX3S+SZRQna6NeW4IY9+Y6gwR/ZVPvXtLKYnz/wn9+6mGJzRnNa+fgB/aFgeEGPXlIDSnXb9cN+937FAX4x2Yh4FPEJwgxgqymr4nl7rRHUht6M11trfLbywYr5E3O48LTP32LX/Jl/p34wBOp3psXcu1LLAw4vcyUlrQ0y7WqoK2B7+OKM X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231022)(93006095)(93001095)(6041248)(20161123562025)(20161123560025)(20161123558100)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:SN2PR05MB2783; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:SN2PR05MB2783; X-Forefront-PRVS: 0515208626 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(39860400002)(189003)(199004)(1076002)(47776003)(83506002)(2950100002)(25786009)(53936002)(8676002)(6116002)(305945005)(50466002)(7736002)(3846002)(66066001)(6916009)(81166006)(2906002)(23726003)(16526018)(58126008)(55016002)(97736004)(81156014)(478600001)(86362001)(105586002)(6666003)(2361001)(106356001)(316002)(16586007)(33656002)(7696005)(8936002)(5660300001)(68736007)(2351001)(52116002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR05MB2783; H:bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR05MB2783; 23:7GBc3vX54Evb8R1/aA6LdIkkZSFJN6ZtHkY+3v/6s?= =?us-ascii?Q?KrGS5c3SRZHJ2rTVBumWUyMBBGKCyfljD7VFBzOzRX22a63ReYIW9w1QwqYa?= =?us-ascii?Q?S/sFaMQfI+x3gegcIKgU4HiA7nKj8u+AncQAlsImp0RtZMAQwpPelyoQcCWG?= =?us-ascii?Q?JQaNrwLp3oND+qvqUMba4UqLMLRo7Tu9qZ/mbAlXQbAPQJ49k9+ikUY+PwYx?= =?us-ascii?Q?q/QZHIomW2piYHdlAZyh4i03AxuT/bPmqYsU6OhMnvlz3e6lo1vCE0f1J8OQ?= =?us-ascii?Q?/Y4F6CRt3bLnDkYbrRJ0a2UJP9DaOiMQVswxUwvpbI1Km0m3Lo8v+qd2CJ3m?= =?us-ascii?Q?kUhvVakus3ZnU1I/WCBzYR5LJZoowI5yg/MTUYR//RlvP2cheZDxxX6qFHOq?= =?us-ascii?Q?gXMOqnSTI9uT36E3Oj5TLgUUNwAfZ1lUCcC1tIOXSscJIV32i6xcsZlfnYV2?= =?us-ascii?Q?XCC2aTy6UCuDK14GdSr3ocOf8cn9yYVJT+I7eMDpgxkAHe6yRIlIWR9FFMmh?= =?us-ascii?Q?y0QRwMZmoakuGbqvsE+aUS7cf9DUTN64AFItaUbUeWvwcoZHhbEsdv2zBpLp?= =?us-ascii?Q?2DFDksoymKdX+71pbih04zNMqGhWuP8wiR5TFLo4sASMxpbJSBtAHln1zG/p?= =?us-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XdY7DDGoATJnI08KCMCYmprgpAHK3zw5NzkCMJqNA1kCegIMe5zqJ6YAFqv92qiJUNvR5QecchV4XMsWYQQs+zRjM+/VTjtXDboUhAbos8=; 7:+6dNBJWi2pP0MiKqTED7D9nRHUsAidFOeIj1n8KQMuqXLo8abAawuRIw42Tw3TVN0I9mjzHZOuW/E5yZzKOx3ubDVJo2ircs/HsMQss3nD15BhzqQ1cCriemlDGm7vR3pjwWZUH/hwUrlR9W2kj1t3cEm2yBWVCdv4WlgIbq0zml4P2waOxup0tQUHwav04LQiD7icTTpymeWg2MmcGaW8frFZYTjJ9dN9YJYE3ppH5leT4XEOqhLSsgtIBsjuC7 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR05MB2783; 20:VKo0DpWSNvPWvrWc1F2LCMZcUuwXTtRUgDw9qSxjVFdqsIql18AEwr20T6VT1kY+2TUPO0t09gfC4qV4gZpSm21w2Q01zEcGfpoVvfyna2+PY67wB+RUG10W+6tvD/CZ8RJv5+HAI+Zf5UmM0cI4T7PjABXjPXpr3wtDWDSdFds= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 19:01:39.3970 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5119a48f-20e4-4865-60b3-08d53e6e1d17 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR05MB2783 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 The QP cleanup did not previously call ib_umem_release. Fix this. Testing Done: ibv_rc_pingpong, rping, perftests. Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Reviewed-by: Adit Ranadive Reviewed-by: Aditya Sarwade Reviewed-by: Jorgen Hansen Signed-off-by: Bryan Tan Reviewed-by: Yuval Shaia --- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c index b932b7e..77e7e57 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c @@ -430,6 +430,13 @@ static void pvrdma_free_qp(struct pvrdma_qp *qp) atomic_dec(&qp->refcnt); wait_event(qp->wait, !atomic_read(&qp->refcnt)); + if (!qp->is_kernel) { + if (qp->rumem) + ib_umem_release(qp->rumem); + if (qp->sumem) + ib_umem_release(qp->sumem); + } + pvrdma_page_dir_cleanup(dev, &qp->pdir); kfree(qp);