From nobody Thu Apr 2 22:12:12 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE8DB21FF21; Fri, 13 Feb 2026 11:01:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770980490; cv=none; b=OhI8LYzmZU94L+DQWIwKunlwFrTwVCkQoyxITv5tMtDc9jlxoECCehjdymlhC0rgDgc3vNso9Ghvd9ohpsaeqhjAv8kpfFesJL8hnQLiXn/q1zGNJPmOGeseqzhhBb1yMfaWyhmaRCO/SGEKx/v7Pmwt3vtE/w16BvJaSoEmkyU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770980490; c=relaxed/simple; bh=RKz91Km/bw5jaUIlB06o1jODkQWcQw0bXu5KVJqakUA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Aps+waWs9THEU/VUn0rB7ccg4eces7h/8ACnJh8jX2v6eFQOIPmrHzcJycgbnuXOaZ2a1Vo8vDTRMsheirIf94JSRK1Zzlm0qjcyn+h4wJ0boHc+gMdFjmXaJscef+7WrtyFvIisOZOfhDboXIFt1sUYJni2w1UngI6M7a2H6OY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Cl/xECrF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Cl/xECrF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50AD4C116C6; Fri, 13 Feb 2026 11:01:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770980490; bh=RKz91Km/bw5jaUIlB06o1jODkQWcQw0bXu5KVJqakUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cl/xECrF4FnYkfZmeA+TMUMF+Zatw9ml8W0xI37eRz/EgRHIr+ZRzjlHDCfLlY+9i o/rNTWNDEkzczt5ktzRcv3xlhDW7hz2D/bnvuBkgkwscyQA97cdIurkjgkLJsd1PT0 6N3bkPO5Vxu/DH7ybxgeItrQbJLZMnAePoBAYxjU66Gq8Bcr5jyjUw51IOhYFNkMud QfMVTnQMcCrBnKTyWugjuBunqTVR3qk8d2aKIIY+zLGn3X7sI6iD0UmsSUALoGp5xC tzbhRNDkBEDY4CTM4Blt/mv0nEXJzfA0+WDPM538ycKgHc7KwjaWY86OEg2IG0OqkY hGGhgEg/R6lTw== From: Leon Romanovsky To: Jason Gunthorpe , Leon Romanovsky , Selvin Xavier , Kalesh AP , Potnuri Bharat Teja , Michael Margolin , Gal Pressman , Yossi Leybovich , Cheng Xu , Kai Shen , Chengchang Tang , Junxian Huang , Abhijit Gangurde , Allen Hubbe , Krzysztof Czurylo , Tatyana Nikolova , Long Li , Konstantin Taranov , Yishai Hadas , Michal Kalderon , Bryan Tan , Vishnu Dasa , Broadcom internal kernel review list , Christian Benvenuti , Nelson Escobar , Dennis Dalessandro , Bernard Metzler , Zhu Yanjun Cc: linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-hyperv@vger.kernel.org Subject: [PATCH rdma-next 42/50] RDMA/bnxt_re: Complete CQ resize in a single step Date: Fri, 13 Feb 2026 12:58:18 +0200 Message-ID: <20260213-refactor-umem-v1-42-f3be85847922@nvidia.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260213-refactor-umem-v1-0-f3be85847922@nvidia.com> References: <20260213-refactor-umem-v1-0-f3be85847922@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.15-dev-47773 Content-Transfer-Encoding: quoted-printable From: Leon Romanovsky There is no need to defer the CQ resize operation, as it is intended to be completed in one pass. The current bnxt_re_resize_cq() implementation does not handle concurrent CQ resize requests, and this will be addressed in the following patches. Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 33 +++++++++-------------------= ---- 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/= hw/bnxt_re/ib_verbs.c index d652018c19b3..2aecfbbb7eaf 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -3309,20 +3309,6 @@ int bnxt_re_create_cq(struct ib_cq *ibcq, const stru= ct ib_cq_init_attr *attr, return rc; } =20 -static void bnxt_re_resize_cq_complete(struct bnxt_re_cq *cq) -{ - struct bnxt_re_dev *rdev =3D cq->rdev; - - bnxt_qplib_resize_cq_complete(&rdev->qplib_res, &cq->qplib_cq); - - cq->qplib_cq.max_wqe =3D cq->resize_cqe; - if (cq->resize_umem) { - ib_umem_release(cq->ib_cq.umem); - cq->ib_cq.umem =3D cq->resize_umem; - cq->resize_umem =3D NULL; - cq->resize_cqe =3D 0; - } -} =20 int bnxt_re_resize_cq(struct ib_cq *ibcq, unsigned int cqe, struct ib_udata *udata) @@ -3387,7 +3373,15 @@ int bnxt_re_resize_cq(struct ib_cq *ibcq, unsigned i= nt cqe, goto fail; } =20 - cq->ib_cq.cqe =3D cq->resize_cqe; + bnxt_qplib_resize_cq_complete(&rdev->qplib_res, &cq->qplib_cq); + + cq->qplib_cq.max_wqe =3D cq->resize_cqe; + ib_umem_release(cq->ib_cq.umem); + cq->ib_cq.umem =3D cq->resize_umem; + cq->resize_umem =3D NULL; + cq->resize_cqe =3D 0; + + cq->ib_cq.cqe =3D entries; atomic_inc(&rdev->stats.res.resize_count); =20 return 0; @@ -3907,15 +3901,6 @@ int bnxt_re_poll_cq(struct ib_cq *ib_cq, int num_ent= ries, struct ib_wc *wc) struct bnxt_re_sqp_entries *sqp_entry =3D NULL; unsigned long flags; =20 - /* User CQ; the only processing we do is to - * complete any pending CQ resize operation. - */ - if (cq->ib_cq.umem) { - if (cq->resize_umem) - bnxt_re_resize_cq_complete(cq); - return 0; - } - spin_lock_irqsave(&cq->cq_lock, flags); budget =3D min_t(u32, num_entries, cq->max_cql); num_entries =3D budget; --=20 2.52.0