Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support

2020-12-02 Thread Jason Gunthorpe
> > ; Sumit Semwal ; Christian Koenig > > ; Vetter, Daniel > > > > Subject: Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support > > > > On Fri, Nov 27, 2020 at 12:55:41PM -0800, Jianxin Xiong wrote: > > > > > > +function(rdm

RE: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support

2020-12-01 Thread Xiong, Jianxin
Daniel > > Subject: Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support > > On Mon, Nov 30, 2020 at 05:53:39PM +, Xiong, Jianxin wrote: > > > From: Jason Gunthorpe > > > Sent: Monday, November 30, 2020 8:08 AM > > > To: Xiong, Jianxin > &

Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support

2020-12-01 Thread Jason Gunthorpe
On Mon, Nov 30, 2020 at 05:04:43PM +0100, Daniel Vetter wrote: > On Mon, Nov 30, 2020 at 11:55:44AM -0400, Jason Gunthorpe wrote: > > On Mon, Nov 30, 2020 at 03:57:41PM +0100, Daniel Vetter wrote: > > > > + err = ioctl(dri->fd, DRM_IOCTL_AMDGPU_GEM_CREATE, &gem_create); > > > > + if (er

Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support

2020-12-01 Thread Jason Gunthorpe
On Mon, Nov 30, 2020 at 03:57:41PM +0100, Daniel Vetter wrote: > > + err = ioctl(dri->fd, DRM_IOCTL_AMDGPU_GEM_CREATE, &gem_create); > > + if (err) > > + return err; > > + > > + *handle = gem_create.out.handle; > > + return 0; > > +} > > + > > +static int radeon_alloc(struct dri *

Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support

2020-12-01 Thread Jason Gunthorpe
On Fri, Nov 27, 2020 at 12:55:41PM -0800, Jianxin Xiong wrote: > > +function(rdma_multifile_module PY_MODULE MODULE_NAME LINKER_FLAGS) I think just replace rdma_cython_module with this? No good reason I can see to have two APIs? > + set(ALL_CFILES "") > + foreach(SRC_FILE ${ARGN}) > +get_

RE: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support

2020-11-30 Thread Xiong, Jianxin
g > Subject: Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support > > > +cdef class DmaBuf: > > +def __init__(self, size, unit=0): > > +""" > > +Allocate DmaBuf object from a GPU device. This is done through the > &

RE: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support

2020-11-30 Thread Xiong, Jianxin
iel > ; Christian Koenig > Subject: Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support > > On Mon, Nov 30, 2020 at 12:36:42PM -0400, Jason Gunthorpe wrote: > > On Mon, Nov 30, 2020 at 05:04:43PM +0100, Daniel Vetter wrote: > > > On Mon, Nov 30, 2020 at 11:5

RE: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support

2020-11-30 Thread Xiong, Jianxin
Daniel > > Subject: Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support > > On Fri, Nov 27, 2020 at 12:55:41PM -0800, Jianxin Xiong wrote: > > > > +function(rdma_multifile_module PY_MODULE MODULE_NAME LINKER_FLAGS) > > I think just replace rdma_cython_mod

Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support

2020-11-30 Thread Daniel Vetter
On Mon, Nov 30, 2020 at 12:36:42PM -0400, Jason Gunthorpe wrote: > On Mon, Nov 30, 2020 at 05:04:43PM +0100, Daniel Vetter wrote: > > On Mon, Nov 30, 2020 at 11:55:44AM -0400, Jason Gunthorpe wrote: > > > On Mon, Nov 30, 2020 at 03:57:41PM +0100, Daniel Vetter wrote: > > > > > + err = ioctl(dri

Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support

2020-11-30 Thread Daniel Vetter
On Mon, Nov 30, 2020 at 11:55:44AM -0400, Jason Gunthorpe wrote: > On Mon, Nov 30, 2020 at 03:57:41PM +0100, Daniel Vetter wrote: > > > + err = ioctl(dri->fd, DRM_IOCTL_AMDGPU_GEM_CREATE, &gem_create); > > > + if (err) > > > + return err; > > > + > > > + *handle = gem_create.out.handle; > >

Re: [PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support

2020-11-30 Thread Daniel Vetter
On Fri, Nov 27, 2020 at 12:55:41PM -0800, Jianxin Xiong wrote: > Define a new sub-class of 'MR' that uses dma-buf object for the memory > region. Define a new class 'DmaBuf' as a wrapper for dma-buf allocation > mechanism implemented in C. > > Add a method to buildlib for building modules with mix

[PATCH rdma-core v3 4/6] pyverbs: Add dma-buf based MR support

2020-11-27 Thread Jianxin Xiong
Define a new sub-class of 'MR' that uses dma-buf object for the memory region. Define a new class 'DmaBuf' as a wrapper for dma-buf allocation mechanism implemented in C. Add a method to buildlib for building modules with mixed Cython and C source. Signed-off-by: Jianxin Xiong --- buildlib/pyve