RE: [PATCH v5 1/5] RDMA/umem: Support importing dma-buf as user memory region

2020-10-18 Thread Xiong, Jianxin
o: Xiong, Jianxin > > > Cc: linux-r...@vger.kernel.org; dri-devel@lists.freedesktop.org; > > > Doug Ledford ; Leon Romanovsky > > > ; Sumit Semwal ; Christian > > > Koenig ; Vetter, Daniel > > > > > > Subject: Re: [PATCH v5 1/5] RDMA/umem: Support

Re: [PATCH v5 1/5] RDMA/umem: Support importing dma-buf as user memory region

2020-10-18 Thread Daniel Vetter
On Sat, Oct 17, 2020 at 9:05 PM Jason Gunthorpe wrote: > > On Thu, Oct 15, 2020 at 03:02:45PM -0700, Jianxin Xiong wrote: > > > +static void ib_umem_dmabuf_invalidate_cb(struct dma_buf_attachment *attach) > > +{ > > + struct ib_umem_dmabuf *umem_dmabuf = attach->importer_priv; > > + > > +

Re: [PATCH v5 1/5] RDMA/umem: Support importing dma-buf as user memory region

2020-10-17 Thread Jason Gunthorpe
> > ; Sumit Semwal ; Christian Koenig > > ; Vetter, Daniel > > > > Subject: Re: [PATCH v5 1/5] RDMA/umem: Support importing dma-buf as user > > memory region > > > > On Thu, Oct 15, 2020 at 03:02:45PM -0700, Jianxin Xiong w

Re: [PATCH v5 1/5] RDMA/umem: Support importing dma-buf as user memory region

2020-10-17 Thread Jason Gunthorpe
On Thu, Oct 15, 2020 at 03:02:45PM -0700, Jianxin Xiong wrote: > +static void ib_umem_dmabuf_invalidate_cb(struct dma_buf_attachment *attach) > +{ > + struct ib_umem_dmabuf *umem_dmabuf = attach->importer_priv; > + > + dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv); > + > + ib

Re: [PATCH v5 1/5] RDMA/umem: Support importing dma-buf as user memory region

2020-10-17 Thread Jason Gunthorpe
On Thu, Oct 15, 2020 at 03:02:45PM -0700, Jianxin Xiong wrote: > +struct ib_umem *ib_umem_dmabuf_get(struct ib_device *device, > +unsigned long addr, size_t size, > +int dmabuf_fd, int access, > +const s

RE: [PATCH v5 1/5] RDMA/umem: Support importing dma-buf as user memory region

2020-10-16 Thread Xiong, Jianxin
> > Subject: Re: [PATCH v5 1/5] RDMA/umem: Support importing dma-buf as user > memory region > > On Thu, Oct 15, 2020 at 03:02:45PM -0700, Jianxin Xiong wrote: > > +struct ib_umem *ib_umem_dmabuf_get(struct ib_device *device, > > +

RE: [PATCH v5 1/5] RDMA/umem: Support importing dma-buf as user memory region

2020-10-16 Thread Xiong, Jianxin
Daniel > > Subject: Re: [PATCH v5 1/5] RDMA/umem: Support importing dma-buf as user > memory region > > On Thu, Oct 15, 2020 at 03:02:45PM -0700, Jianxin Xiong wrote: > > > +static void ib_umem_dmabuf_invalidate_cb(struct dma_buf_attachment > > +*attach) { > > +

[PATCH v5 1/5] RDMA/umem: Support importing dma-buf as user memory region

2020-10-15 Thread Jianxin Xiong
Dma-buf is a standard cross-driver buffer sharing mechanism that can be used to support peer-to-peer access from RDMA devices. Device memory exported via dma-buf is associated with a file descriptor. This is passed to the user space as a property associated with the buffer allocation. When the buf