Re: [PATCH rdma-next v6 3/4] RDMA/bnxt_re: Direct Verbs: Support DBR verbs

Jason Gunthorpe
2026-01-09T18:50:39Z

On Wed, Dec 24, 2025 at 09:56:01AM +0530, Sriharsha Basavapatna wrote:
> + ret = uverbs_copy_to_struct_or_zero(attrs, BNXT_RE_DV_ALLOC_DBR_ATTR,
> + &dbr, sizeof(dbr));
> + if (ret)
> + goto free_entry;
> +
> + ret = uverbs_copy_to(attrs, BNXT_RE_DV_ALLOC_DBR_OFFSET,
> + &mmap_offset, sizeof(mmap_offset));
^^^^^^^^^^^^

> +DECLARE_UVERBS_NAMED_METHOD(BNXT_RE_METHOD_DBR_ALLOC,
> + UVERBS_ATTR_IDR(BNXT_RE_DV_ALLOC_DBR_HANDLE,
> + BNXT_RE_OBJECT_DBR,
> + UVERBS_ACCESS_NEW,
> + UA_MANDATORY),
> + UVERBS_ATTR_PTR_OUT(BNXT_RE_DV_ALLOC_DBR_ATTR,
> + UVERBS_ATTR_STRUCT(struct bnxt_re_dv_db_region,
> + umdbr),
> + UA_MANDATORY),
> + UVERBS_ATTR_PTR_IN(BNXT_RE_DV_ALLOC_DBR_OFFSET,
^^^^^^^

ptr_in shuld not be used with copy_to

Jason