Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp337116pxv; Thu, 22 Jul 2021 01:01:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxea78FdXkLiN/z+4Dcmn7yT5m3Qqc+yRa9mhuolyqD6xm1H69R8RPym5vu+kopXrtYIY7e X-Received: by 2002:a05:6402:53:: with SMTP id f19mr52973879edu.200.1626940913558; Thu, 22 Jul 2021 01:01:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626940913; cv=none; d=google.com; s=arc-20160816; b=uIdPJULtP+gl1ZzdYniSAWQUq9ejal5Rv12Ou3PxRalu/r5mKXl6iIxq2uxp45H130 Kgm7EOal1gTHTeEli+cEK327H1zZmFwTYtw7QDWu792+LmJizKWRYrTtXXz1m+p5nGH8 wB8UP/1DpGl21zAR5q6/RFe/HGBN5BKQca9eaW2tTNlz5Zmua5pWaFur7qMBnISuGF46 UxIcMhBNvFHwYJh+7ZYsLIRFkdJKUHCGXFh8sfSXjYWTnzaFCdDPL7PBhYS36eub88h8 P9VTPG5ALfFSFTRHeZVFJr9Bj0UPCS378rUezMj5hSok1H4kpdJsybBM5hVbfKcJ6bIF F6eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=FkUbNDjYmqAAQSCXEjmZOBbCPWpPRLhlO8tKjvir3w8=; b=d/fFZW9aECjkkDE0jQp/x2l7EYOmB1rnfoJ3s1XIWZIpQV54uvwhJC47RJt+x76vxp LwDUxRcooiN4IWJdi/IrQ9zbxhUecsFizLteQEQ8rDNNNZMZ9/r9Mh8MHlWuiXE5HM88 hmIBbsGiBKfv8MELPZ2P6e6TmFLXMN29QbaLAITdt83Gc9LG4NFqxY0wpAo8hqEr2joy PdxfkvE6q+trnV2GOteCIpt6Zin2JDnzotAOj/Lh0uM9u/jVw+bCnpJA6fNOgfVC/Imk gMQjg9IGXPO1jQXNH09w8LNPPRoQpk/l591weNPQNAdYKiJgjX1qIHruqGzP5LQQj65H KCcQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t1si5495960edd.382.2021.07.22.01.01.29; Thu, 22 Jul 2021 01:01:53 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231284AbhGVHSf (ORCPT + 99 others); Thu, 22 Jul 2021 03:18:35 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:7412 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230474AbhGVHSc (ORCPT ); Thu, 22 Jul 2021 03:18:32 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4GVl9n3xKvz7tkq; Thu, 22 Jul 2021 15:55:25 +0800 (CST) Received: from dggpeml500017.china.huawei.com (7.185.36.243) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 22 Jul 2021 15:59:05 +0800 Received: from [10.40.238.78] (10.40.238.78) by dggpeml500017.china.huawei.com (7.185.36.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 22 Jul 2021 15:59:05 +0800 Subject: Re: [PATCH rdma-next 8/9] RDMA: Globally allocate and release QP memory To: Leon Romanovsky , Doug Ledford , Jason Gunthorpe References: <5b3bff16da4b6f925c872594262cd8ed72b301cd.1626609283.git.leonro@nvidia.com> CC: Leon Romanovsky , Adit Ranadive , Ariel Elior , Bernard Metzler , Christian Benvenuti , Dennis Dalessandro , Gal Pressman , , , 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 From: Wenpeng Liang Message-ID: <2d36585e-97da-1b27-4e2c-f3a7d2b76db7@huawei.com> Date: Thu, 22 Jul 2021 15:59:04 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <5b3bff16da4b6f925c872594262cd8ed72b301cd.1626609283.git.leonro@nvidia.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.40.238.78] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500017.china.huawei.com (7.185.36.243) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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;