From mboxrd@z Thu Jan 1 00:00:00 1970 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 BE5E838B7B7; Thu, 26 Feb 2026 06:54:08 +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=1772088848; cv=none; b=VM4e4JTI9nu3h1N9sgoaTppnftVAL3Qj58iaoyicK+xvVbqkgEffIAXRMHuJl1DVGrp0YrWuzzQOOYW1/WsQvchk4oHO44dLsfS+r/L1fp4Ob6+JtY31t+yeHLMhelEmuyW1a6iw00shEMMvSPx1+NLb/PRORBURFvU+ReQ0P1c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772088848; c=relaxed/simple; bh=6wP04o8J/I3iQSrV6t04KpfXZMm7q3Dov8vdpAFTXSc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kdbEf8VYW98+T+5OyieS4hgheQcb5lnlIPh6xxTU4dLCLWd8H9q31nAwz5weQ2A2eDG4XdupXUlAwmRx0fnHDgE3Xy6SBVLEN/QpH4nKvM7Yd2eO2KsAc6yhXHjm3GuYx4+Vd5+0zEJIscOJcsCIIMHEiqL/N+uckJbyXuRmT+A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oKW7n9zF; 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="oKW7n9zF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAD0AC19422; Thu, 26 Feb 2026 06:54:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772088848; bh=6wP04o8J/I3iQSrV6t04KpfXZMm7q3Dov8vdpAFTXSc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oKW7n9zFwdS8zU411mBQS86BhhwIc9msdiNSFTEJu53jvPmZfWzljbggV7CId+s2N LMpqlT3+pWskQ0IjAMizG4f4eJ0rRrXIg45hVdEw7p7RQyCrZd2OJrBIORkgIiVK+6 +mhR+U38x9ByuGSOIYdrWPcxK2Yrg3mmfEvqHpBloFYFvbFGA5IdBUhEDR9Y8rYiSu iShDfdkyP30ZJ71ymG+uYY5Jxtbt9gAeOqbVjAYZEVaq6/VAF2UeEwGEtFgtPPcBXF zf6SGqDBRVduEwws8KG9LKyqROK+SQB/nD0IaR/tgc3NqWg/a56aIB2GamKio35H+0 mg9//hERz7DyA== Date: Thu, 26 Feb 2026 08:54:04 +0200 From: Leon Romanovsky To: Junxian Huang Cc: Jason Gunthorpe , Selvin Xavier , Kalesh AP , Potnuri Bharat Teja , Michael Margolin , Gal Pressman , Yossi Leybovich , Cheng Xu , Kai Shen , Chengchang Tang , 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 , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-hyperv@vger.kernel.org Subject: Re: [PATCH rdma-next 26/50] RDMA/erdma: Separate user and kernel CQ creation paths Message-ID: <20260226065404.GB12611@unreal> References: <20260213-refactor-umem-v1-0-f3be85847922@nvidia.com> <20260213-refactor-umem-v1-26-f3be85847922@nvidia.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Feb 26, 2026 at 02:17:38PM +0800, Junxian Huang wrote: > > > On 2026/2/13 18:58, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Split CQ creation into distinct kernel and user flows. The hns driver, > > inherited from mlx4, uses a problematic pattern that shares and caches > > umem in hns_roce_db_map_user(). This design blocks the driver from > > supporting generic umem sources (VMA, dmabuf, memfd, and others). > > > > In addition, let's delete counter that counts CQ creation errors. There > > are multiple ways to debug kernel in modern kernel without need to rely > > on that debugfs counter. > > > > Signed-off-by: Leon Romanovsky > > --- > > drivers/infiniband/hw/hns/hns_roce_cq.c | 103 ++++++++++++++++++++------- > > drivers/infiniband/hw/hns/hns_roce_debugfs.c | 1 - > > drivers/infiniband/hw/hns/hns_roce_device.h | 3 +- > > drivers/infiniband/hw/hns/hns_roce_main.c | 1 + > > 4 files changed, 82 insertions(+), 26 deletions(-) <...> > > +int hns_roce_create_cq(struct ib_cq *ib_cq, const struct ib_cq_init_attr *attr, > > + struct uverbs_attr_bundle *attrs) > > +{ > > + struct hns_roce_dev *hr_dev = to_hr_dev(ib_cq->device); > > + struct hns_roce_ib_create_cq_resp resp = {}; > > + struct hns_roce_cq *hr_cq = to_hr_cq(ib_cq); > > + struct ib_device *ibdev = &hr_dev->ib_dev; > > + struct hns_roce_ib_create_cq ucmd = {}; > > ucmd and resp are not needed since we don't have udata here. Thanks, will fix. > > Junxian