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

2020-11-06 Thread Jason Gunthorpe
On Tue, Nov 03, 2020 at 09:43:17PM +0100, Daniel Vetter wrote: > > > Yeah definitely don't call dma_buf_map_attachment and expect a page back. > > > In practice you'll get a page back fairly often, but I don't think > > > we want to bake that in, maybe we eventually get to non-hacky dma_addr_t

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

2020-11-03 Thread Xiong, Jianxin
> > To: Jason Gunthorpe > > > Cc: Xiong, Jianxin ; linux-rdma > > > ; dri-devel > > > ; Leon Romanovsky > > > ; Doug Ledford ; Vetter, > > > Daniel ; Christian Koenig > > > > > > Subject: Re: [PATCH v6 1/4] RDMA/umem: Support imp

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

2020-11-03 Thread Daniel Vetter
; > Romanovsky ; Doug Ledford ; Vetter, > > Daniel ; Christian Koenig > > > > Subject: Re: [PATCH v6 1/4] RDMA/umem: Support importing dma-buf as user > > memory region > > > > > > > + > > > > > +#ifdef CONFIG_DMA_VIRT_OPS

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

2020-11-03 Thread Xiong, Jianxin
> -Original Message- > From: Daniel Vetter > Sent: Friday, October 23, 2020 6:45 PM > To: Jason Gunthorpe > Cc: Xiong, Jianxin ; linux-rdma > ; dri-devel ; > Leon > Romanovsky ; Doug Ledford ; Vetter, > Daniel ; Christian Koenig > > Subject: Re:

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

2020-10-28 Thread Jason Gunthorpe
On Tue, Oct 27, 2020 at 05:32:26PM +, Xiong, Jianxin wrote: > > On Mon, Oct 26, 2020 at 09:26:37AM -0300, Jason Gunthorpe wrote: > > > On Sat, Oct 24, 2020 at 08:48:07AM +0100, Christoph Hellwig wrote: > > > > On Fri, Oct 23, 2020 at 03:20:05PM -0300, Jason Gunthorpe wrote: > > > > > The

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

2020-10-28 Thread Jason Gunthorpe
On Fri, Oct 23, 2020 at 09:39:58AM -0700, Jianxin Xiong wrote: > +/* > + * Generate a new dma sg list from a sub range of an existing dma sg list. > + * Both the input and output have their entries page aligned. > + */ > +static int ib_umem_dmabuf_sgt_slice(struct sg_table *sgt, u64 offset, > +

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

2020-10-27 Thread Xiong, Jianxin
Daniel > > Subject: Re: [PATCH v6 1/4] RDMA/umem: Support importing dma-buf as user > memory region > > On Fri, Oct 23, 2020 at 09:39:58AM -0700, Jianxin Xiong wrote: > > +/* > > + * Generate a new dma sg list from a sub range of an existing dma sg list. > > + *

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

2020-10-27 Thread Xiong, Jianxin
Doug Ledford ; > Vetter, Daniel ; Christian Koenig > > Subject: Re: [PATCH v6 1/4] RDMA/umem: Support importing dma-buf as user > memory region > > On Mon, Oct 26, 2020 at 09:26:37AM -0300, Jason Gunthorpe wrote: > > On Sat, Oct 24, 2020 at 08:48:07AM +0100, Christoph Hellwig

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

2020-10-26 Thread Jason Gunthorpe
On Sat, Oct 24, 2020 at 08:48:07AM +0100, Christoph Hellwig wrote: > On Fri, Oct 23, 2020 at 03:20:05PM -0300, Jason Gunthorpe wrote: > > The problem is we have RDMA drivers that assume SGL's have a valid > > struct page, and these hacky/wrong P2P sgls that DMABUF creates cannot > > be passed into

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

2020-10-24 Thread Jason Gunthorpe
On Fri, Oct 23, 2020 at 06:49:11PM +0200, Daniel Vetter wrote: > > +struct ib_umem *ib_umem_dmabuf_get(struct ib_device *device, > > + unsigned long offset, size_t size, > > + int fd, int access, > > + const

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

2020-10-23 Thread Daniel Vetter
On Fri, Oct 23, 2020 at 8:20 PM Jason Gunthorpe wrote: > > On Fri, Oct 23, 2020 at 06:49:11PM +0200, Daniel Vetter wrote: > > > +struct ib_umem *ib_umem_dmabuf_get(struct ib_device *device, > > > + unsigned long offset, size_t size, > > > +

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

2020-10-23 Thread Daniel Vetter
on > > Romanovsky ; Jason Gunthorpe ; > > Doug Ledford ; Vetter, Daniel > > ; Christian Koenig > > Subject: Re: [PATCH v6 1/4] RDMA/umem: Support importing dma-buf as user > > memory region > > > > On Fri, Oct 23, 2020 at 09:39:58AM -0700, Jianxin Xiong wro

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

2020-10-23 Thread Xiong, Jianxin
an Koenig > Subject: Re: [PATCH v6 1/4] RDMA/umem: Support importing dma-buf as user > memory region > > On Fri, Oct 23, 2020 at 09:39:58AM -0700, Jianxin Xiong wrote: > > Dma-buf is a standard cross-driver buffer sharing mechanism that can > > be used to support peer-to-peer

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

2020-10-23 Thread Daniel Vetter
On Fri, Oct 23, 2020 at 09:39:58AM -0700, Jianxin Xiong wrote: > 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