Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp345671pxv; Thu, 22 Jul 2021 01:17:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyws/7mJDfWzzaucikPUBaeUGPT38Wtj3AyWWt1ke4MDwzt86XXgKBN0OdMlc10ypRZwKaD X-Received: by 2002:a5d:88c4:: with SMTP id i4mr30005020iol.210.1626941869858; Thu, 22 Jul 2021 01:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626941869; cv=none; d=google.com; s=arc-20160816; b=ukbByws00/2a06TeNqhL1SblFP+QCBFqYU7yPuIMZnMSz/zJT9dSVH+SVqdYu4KTrp 8l2OKU5auSIecCYi+Quy59XU+JrZE4ovoQO6ZExEnyW+xhn3vSblRpK+jbtxJ44QfXjE de0fnGE2ZnH+NXuWRj4qdNfUZCMjHRrYVTiqAvDFeaadlW8IFBQ4ETXQJMNEPjV+06Vz bFdPUZ0rACqhG6oA2GDHe+M3wXv3IYQuxJm6AyM3FwlhB+GMUG5aTVEwozlj8a2oZXGF RZlhJOJOI5k94y45U/Kypswp0pM1NFls9HnZ0kxo1DtLPtOdnXugeMuxddepYWFfMGdy vw+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=khB4sEGBk+0kp+NMz3rX9DwuMk4Ks8lvewn+HgXLaO0=; b=lWMA6sQcsGOYQQpa2wlVZeTzdkblzZ0ZrSqdm04qUqvJSZSeEp5+t6BIylL8t0uYSU xqhTSKLc3jEp/+qS0P39eGc/XVxmCXHKji8Jm5PNx2eD4R4LgZGMhzoW/7VNuUHMGYXB yobQzWbRR11vxQCHa8bkBl2tjK34TObEFl6rlsOo+ilDuIHtEVg7XuQ3kyflrLwoYguc O5R+lmHrB0xLtaxevKZZJ3uyrB32yNK0dBQdPkCv+tXvfiDP0SoX7fXh8faCp22NksnK jPOsuLo0U9lsmWNRjnu4UOBFEHCJHJYHUZ7KBUTtUJkGUibat2F59NGKHel+amLfHmQf 2G+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Dzdbw9Gq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si28246837ilo.83.2021.07.22.01.17.37; Thu, 22 Jul 2021 01:17:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Dzdbw9Gq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230405AbhGVHf6 (ORCPT + 99 others); Thu, 22 Jul 2021 03:35:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:40128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230048AbhGVHf6 (ORCPT ); Thu, 22 Jul 2021 03:35:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C81FC61279; Thu, 22 Jul 2021 08:16:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626941793; bh=J1qotel+OZG/vKP3FOFqOsfHAvbuOOwMlRpVmukHw6o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Dzdbw9Gqc1dmvNUTZCgg83GPDWaYlMnbGY0WO9YZpmlNE4nUw6hYsLpQ3dJxRBr09 GJgHEeXNPCF/bN208MvMRU7bR16kxcgcholKN60duPXkLLnPxMeCeZGyWcqE6GLn5m pKbDk+QlMpYg8F+hgkyi9EdIjJOHvz2H3SnJUi98ey1hjWcyZbZt437phBnj9YUB9M 7XaIlYROYDCZm3oEOPx+PnCKjKbEHY13phwiM2NLv2CaTN0a8eMK1q+ol2jYj4ThcY 6bFzmRJCq6jqYXXU+1zQdDgHDPmhzjk1npH+lgoz7c1b/bm1YRniDa0ELcO564sg1Q kyK4G8r133XWw== Date: Thu, 22 Jul 2021 11:16:29 +0300 From: Leon Romanovsky To: Wenpeng Liang Cc: Doug Ledford , Jason Gunthorpe , Adit Ranadive , Ariel Elior , Bernard Metzler , Christian Benvenuti , Dennis Dalessandro , Gal Pressman , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Michal Kalderon , Mike Marciniszyn , Mustafa Ismail , Naresh Kumar PBS , Nelson Escobar , Potnuri Bharat Teja , Selvin Xavier , Shiraz Saleem , Steve Wise , VMware PV-Drivers , Weihang Li , Yishai Hadas , Zhu Yanjun Subject: Re: [PATCH rdma-next 8/9] RDMA: Globally allocate and release QP memory Message-ID: References: <5b3bff16da4b6f925c872594262cd8ed72b301cd.1626609283.git.leonro@nvidia.com> <2d36585e-97da-1b27-4e2c-f3a7d2b76db7@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2d36585e-97da-1b27-4e2c-f3a7d2b76db7@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 22, 2021 at 03:59:04PM +0800, Wenpeng Liang wrote: > > > On 2021/7/18 20:00, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Convert QP object to follow IB/core general allocation scheme. > > That change allows us to make sure that restrack properly kref > > the memory. > > > > Signed-off-by: Leon Romanovsky > > Hi, Leon, I tested your patchset, it looks good to hns. > But there is a redundant assignment in hns. > This is the patch. Thanks a lot. > > diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c > index 364f404..fd0f71a 100644 > --- a/drivers/infiniband/hw/hns/hns_roce_qp.c > +++ b/drivers/infiniband/hw/hns/hns_roce_qp.c > @@ -959,8 +959,6 @@ static int set_qp_param(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp, > struct ib_device *ibdev = &hr_dev->ib_dev; > int ret; > > - hr_qp->ibqp.qp_type = init_attr->qp_type; > - > if (init_attr->cap.max_inline_data > hr_dev->caps.max_sq_inline) > init_attr->cap.max_inline_data = hr_dev->caps.max_sq_inline;