From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A812BC43381 for ; Tue, 12 Mar 2019 18:09:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69B45205C9 for ; Tue, 12 Mar 2019 18:09:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="bMnHFEeg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728165AbfCLSJs (ORCPT ); Tue, 12 Mar 2019 14:09:48 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:39211 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727415AbfCLSJr (ORCPT ); Tue, 12 Mar 2019 14:09:47 -0400 Received: by mail-qk1-f193.google.com with SMTP id c189so2040881qke.6 for ; Tue, 12 Mar 2019 11:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=pSGmakp8/nPwNaf24Fy3z3mT5vQgKMVLmBSgFgWtKS8=; b=bMnHFEegkX9BN1W7CqxzxJ+X1pUOg7A723oM86sv34QG4yy3uSPXGrpGRLBKaoASK/ t1+caYPJgaedU8BHoyp4RCvGmJeb15kkNweaVBFUo55OGy4mIP8Q/JXYSMXinM4kDSkC T5lzxhzj3j0bquSfpqz96lVfKbAwahB0N3x1O4XRlRCpReL/1thY3i0KVVTHnbrYgMeU okZgcu5Q5h+U+LTLyTplvzGR6xK+XpNl5M1HC++DHP521PYwQNZdTIZ6+fgYLDSZa+cd HDl8lCFbRNTZqEpj0aSJ7DnoVJrg7zz/CEipfaVOmAZobAZNpuLE/KenepP8DQq+OuR9 wRxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=pSGmakp8/nPwNaf24Fy3z3mT5vQgKMVLmBSgFgWtKS8=; b=q5c5xdSMJ4p7lZ1jd+3XnOo/Rh0MAZ9x1vjim3LPpjowkrIqHluq83jme/Zqhwfb0Z DqA0arlRy9v9otAMogTsmZgUwcCAAYiXOP7g4PlEuQv2H+IoI9HFgwjiECl58aifwMWg ZrNxOCRv8LOCOWPCcSFTJ/AMCpQslO5lNaB9xoIfvXZJunWZlvSveqcg6RUMABgBgfG+ DKe+nxam0iNPGSAEAnxYSSCwrNDD6vSTfxlPGwbX6Q5J+Qnq5Sk1l5k7usVOHGtmmlF6 diyyYa+TEPr/gThAB/ThJtJkOjt472XXE3+xA6HKeFd9ClsUkGWQyBN5/raEwL0TqJqQ 2cNA== X-Gm-Message-State: APjAAAWNWPIRJNaQ5/dsUt/sn27CZrq1sVvbg3dOwskXrIQUPNvNmFHc VCCofAWmEsyhfZCUDyNw0qEtpw== X-Google-Smtp-Source: APXvYqyaiKWlh0lzUAGVBbQFHl8HHEk2lX9jssEOVPuNGA8z+d3VUCJUA05kwHUSbF0jW2TgiEWWHg== X-Received: by 2002:a37:c384:: with SMTP id r4mr10479551qkl.306.1552414186196; Tue, 12 Mar 2019 11:09:46 -0700 (PDT) Received: from ziepe.ca ([24.137.65.181]) by smtp.gmail.com with ESMTPSA id 14sm5543072qkf.23.2019.03.12.11.09.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2019 11:09:45 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1h3lqS-0004U5-TX; Tue, 12 Mar 2019 15:09:44 -0300 Date: Tue, 12 Mar 2019 15:09:44 -0300 From: Jason Gunthorpe To: Leon Romanovsky Cc: Doug Ledford , Yishai Hadas , RDMA mailing list , Artemy Kovalyov , Saeed Mahameed , linux-netdev , Leon Romanovsky Subject: Re: [PATCH mlx5-next] IB/mlx5: Use mlx5 core to create/destroy a DEVX DCT Message-ID: <20190312180944.GC17113@ziepe.ca> References: <20190306172142.21036-1-leon@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190306172142.21036-1-leon@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Mar 06, 2019 at 07:21:42PM +0200, Leon Romanovsky wrote: > From: Yishai Hadas > > To prevent a hardware memory leak when a DEVX DCT object is destroyed > without calling DRAIN DCT before, (e.g. under cleanup flow), need to > manage its creation and destruction via mlx5 core. > > In that case the DRAIN DCT command will be called and only once that > it will be completed the DESTROY DCT command will be called. > Otherwise, the DESTROY DCT may fail and a hardware leak may occur. > > As of that change the DRAIN DCT command should not be exposed any more > from DEVX, it's managed internally by the driver to work as expected by > the device specification. > > Fixes: 7efce3691d33 ("IB/mlx5: Add obj create and destroy functionality") > Signed-off-by: Yishai Hadas > Reviewed-by: Artemy Kovalyov > Signed-off-by: Leon Romanovsky > --- > drivers/infiniband/hw/mlx5/devx.c | 34 +++++++++++++++----- > drivers/infiniband/hw/mlx5/qp.c | 4 ++- > drivers/net/ethernet/mellanox/mlx5/core/qp.c | 6 ++-- > include/linux/mlx5/qp.h | 3 +- > 4 files changed, 34 insertions(+), 13 deletions(-) Applied to for-rc Thanks, Jason