Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2901054pxv; Sun, 18 Jul 2021 05:02:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGMsZi7qTggbwE1asm6MDi6Lf5wPIblc1jjFA/UB1Fqf2PDd1QKIP0GphlQdQirWRwZtoo X-Received: by 2002:a05:6e02:154b:: with SMTP id j11mr706638ilu.96.1626609752040; Sun, 18 Jul 2021 05:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626609752; cv=none; d=google.com; s=arc-20160816; b=e23CTIq4JB+upHG11yUMMD4p9l3sPygFQxsnKxDC2OXvZXZonDpc/I/iVP/gTgKhLG uQ+cjel9cHtYPBZcABlQhHW+XpR59rQirUeiLaEwa0jj/QKOC6udlQUxi7i2CkWr8RIE w3aGg3t70D+bvHmIl5uppJrX9OmdmY5yIoqH2y0t0z29jG6tNhtaDGTJaF4C/wK29n3x XF9yNvHPTmKz4TzOxHuvQ1yM7OkUmGTZqS0guB4AefS5ZKke+d4e+J1CeLK8zewN8MpS AVArEC6v7pDDAoJxqy5adcct/4bQyVQsYQnbpaLRkpgHlyFMAT2stnhIVr8/5Abfkf47 jF/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Vz0NfkyMH8/9yQBR5Kp3JyR1etOF9fz1lqtlQq9nA04=; b=amRmg/XdfDmBPe1rxIEQINXIGd2qblJ0VW1S0spjZyPUlY8b1qDLHsyFpTGsJbthi4 C6I/rDNqz7mF8PkZ8lAMAvHwFYNWYVYkgVPamdBu0t09izihPpGhDLTsqh6DqJY4pCEZ DIq3rNvbWhPqVgPIThdUeoGgvFIYYV92tObqjbaSkDP7gaktAAIqzneHHLHkUZ8fMQ4b fh/XFE3M/2RVB4YeDb+UU/eyhhfW3v14B/eNgrW5h26Xrd7Rxja5pkKGfZtiudnjtfCO lF+1mi4VZoxbW/8/ugbKKZXQxj1lmas45MEFwXpZ55n/4i/Ng0gKMdyywbCQ9sevXnrB 01ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GCIN+0A0; 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 f16si16564754iol.39.2021.07.18.05.02.20; Sun, 18 Jul 2021 05:02:32 -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=GCIN+0A0; 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 S233230AbhGRMEK (ORCPT + 99 others); Sun, 18 Jul 2021 08:04:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:43710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233188AbhGRMEG (ORCPT ); Sun, 18 Jul 2021 08:04:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2C714610D1; Sun, 18 Jul 2021 12:01:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626609668; bh=+0os3ryL31iZeQ6MByhLX4F/Nn2Iz8unL7CcJXDsMCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GCIN+0A01K63F/5hikTPqx+dOqT+t9g3BPgTHLu7OtmpRziYdmeMlcBzO1YU2W0Pl /8EDE793UEhepc8YqhGx/BqNwACmISRpUUT2Bgu8JdU4FwLFzUAcxPCWaXtNcvGefF ndCQwPOaEdyyqWJzu9vKeVW22IC4Saqsa7wXt1SiF3xEKFnoaW7m3uSYQeMU1dQrQ8 5byKe/PE6BAXGmz9raFiNUtjwT1ajQe/nIeNhqcDefjV+QX+QMZNOxOx+lHY8DfobG EoDjEDPwlrri3kCnRNlLWD0+V8f1disNlNDL9TzRVCuy9ozwcbe19t3BeLsOj7zPqS UgYTXy12w6GvQ== From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Leon Romanovsky , 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 , Wenpeng Liang , Yishai Hadas , Zhu Yanjun Subject: [PATCH rdma-next 1/9] RDMA/hns: Don't skip IB creation flow for regular RC QP Date: Sun, 18 Jul 2021 15:00:51 +0300 Message-Id: <463b6d3ae17dc400d9eecc22441f6480cb2b3705.1626609283.git.leonro@nvidia.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky The call to internal QP creation function skips QP creation checks and misses the addition of such device QPs to the restrack DB. As a preparation to general allocation scheme, convert hns to use proper API. Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c index a3305d196675..e0f59b8d7d5d 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c @@ -758,7 +758,7 @@ static struct hns_roce_qp *hns_roce_v1_create_lp_qp(struct hns_roce_dev *hr_dev, init_attr.cap.max_recv_wr = HNS_ROCE_MIN_WQE_NUM; init_attr.cap.max_send_wr = HNS_ROCE_MIN_WQE_NUM; - qp = hns_roce_create_qp(pd, &init_attr, NULL); + qp = ib_create_qp(pd, &init_attr); if (IS_ERR(qp)) { dev_err(dev, "Create loop qp for mr free failed!"); return NULL; @@ -923,7 +923,7 @@ static int hns_roce_v1_rsv_lp_qp(struct hns_roce_dev *hr_dev) create_lp_qp_failed: for (i -= 1; i >= 0; i--) { hr_qp = free_mr->mr_free_qp[i]; - if (hns_roce_v1_destroy_qp(&hr_qp->ibqp, NULL)) + if (ib_destroy_qp(&hr_qp->ibqp)) dev_err(dev, "Destroy qp %d for mr free failed!\n", i); } @@ -953,7 +953,7 @@ static void hns_roce_v1_release_lp_qp(struct hns_roce_dev *hr_dev) if (!hr_qp) continue; - ret = hns_roce_v1_destroy_qp(&hr_qp->ibqp, NULL); + ret = ib_destroy_qp(&hr_qp->ibqp); if (ret) dev_err(dev, "Destroy qp %d for mr free failed(%d)!\n", i, ret); -- 2.31.1