Re: [PATCH v5 for-next 1/7] RDMA/bnxt_re: Use the common mmap helper functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 12, 2023 at 11:37 PM Jason Gunthorpe <jgg@xxxxxxxxxx> wrote:
>
> On Mon, Jun 12, 2023 at 02:48:56AM -0700, Selvin Xavier wrote:
>
> > @@ -4002,6 +4044,13 @@ int bnxt_re_alloc_ucontext(struct ib_ucontext *ctx, struct ib_udata *udata)
> >       resp.comp_mask |= BNXT_RE_UCNTX_CMASK_HAVE_MODE;
> >       resp.mode = rdev->chip_ctx->modes.wqe_mode;
> >
> > +     entry = bnxt_re_mmap_entry_insert(uctx, 0, BNXT_RE_MMAP_SH_PAGE, NULL);
> > +     if (!entry) {
> > +             rc = -ENOMEM;
> > +             goto cfail;
> > +     }
> > +     uctx->shpage_mmap = &entry->rdma_entry;
>
> How can this be called with a NULL offset return?
>
> It seems like the offset is hardwired by userspace?
>
Yes. It is hardwired to maintain backward compatibility with
libbnxt_re from older rdma-core.
> If so it should use of the insert exact offset APIs
Will use rdma_user_mmap_entry_insert_exact and repost the series.

>
> Jason

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux