Re: [PATCH v11 rdma-next 5/7] RDMA/qedr: Use the common mmap API

Gal Pressman
2019-09-20T13:40:03Z

On 19/09/2019 20:55, Jason Gunthorpe wrote:
> Huh. If you recall we did all this work with the XA and the free
> callback because you said qedr was mmaping BAR pages that had some HW
> lifetime associated with them, and the HW resource was not to be
> reallocated until all users were gone.
>
> I think it would be a better example of this API if you pulled the
>
> dev->ops->rdma_remove_user(dev->rdma_ctx, ctx->dpi);
>
> Into qedr_mmap_free().
>
> Then the rdma_user_mmap_entry_remove() will call it naturally as it
> does entry_put() and if we are destroying the ucontext we already know
> the mmaps are destroyed.
>
> Maybe the same basic comment for EFA, not sure. Gal?

That's what EFA already does in this series, no?
We no longer remove entries on dealloc_ucontext, only when the entry is freed.