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 <[email protected]>
> >
> > 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 <[email protected]>
> > ---
> > 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