Supported uverbs opcodes?

2015-08-19 Thread Christoph Hellwig
What opcodes are supposed to be submitted by users? Currently we do not define opcodes in the UAPI and kinda rely that userspace uses the same ones as the kernel. For thos defines by libibverbs (RDMA_WRITE, RDMA_WRITE_WITH_IMM, SEND, SEND_WITH_IMM, RDMA_READ, ATOMIC_CMP_AND_SWP and

Re: [PATCH for-next V8 6/6] IB/ucma: HW Device hot-removal support

2015-08-19 Thread Yishai Hadas
On 8/18/2015 8:50 PM, Jason Gunthorpe wrote: On Thu, Aug 13, 2015 at 06:32:07PM +0300, Yishai Hadas wrote: @@ -501,10 +586,24 @@ static ssize_t ucma_destroy_id(struct ucma_file *file, const char __user *inbuf, + if (!ctx-closing) { + mutex_unlock(mut); +

Re: [PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-08-19 Thread Sagi Grimberg
On 7/23/2015 8:55 PM, Jason Gunthorpe wrote: On Thu, Jul 23, 2015 at 01:15:16PM +0300, Sagi Grimberg wrote: I was hoping we'd move the DMA flush and translate into here and make it mandatory. Is there any reason not to do that? The reason I didn't added it in was so the ULPs can make sure

Re: [PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-08-19 Thread Christoph Hellwig
On Wed, Aug 19, 2015 at 02:56:24PM +0300, Sagi Grimberg wrote: So I had a go with moving the DMA mapping into ib_map_mr_sg() and it turns out mapping somewhat poorly if the ULP _may_ register memory or just send sg_lists (like storage targets over IB/iWARP). So the ULP will sometimes use the

Re: [PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-08-19 Thread Sagi Grimberg
Keep it out for now. Ok, I was also thinking on moving the access flags to the work request again. It doesn't make much sense there unless I go with what Jason suggested with ib_map_mr_[lkey|rkey] to protect against remote access for lkeys in IB which to me, sounds redundant at this point

shrink struct ib_send_wr

2015-08-19 Thread Christoph Hellwig
This series shrinks the WR size by splitting out the different WR types. Patch number two is too large for the mailinglist, so if you didn't get it grab it here: http://git.infradead.org/users/hch/rdma.git/commitdiff/30e522ee6c1d7adb614d7308f09fbfd71c6d3e07 or the full git tree at:

[PATCH 3/3] IB: remove xrc_remote_srq_num from struct ib_send_wr

2015-08-19 Thread Christoph Hellwig
The field is only initialized in mlx, but never used. If we want to add proper XRC support it should be done with a new struct ib_xrc_wr. This shrinks the various WR structures by another 4 bytes. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/infiniband/hw/mlx5/qp.c | 1 -

[PATCH 1/3] IB/uverbs: reject invalid or unknown opcodes

2015-08-19 Thread Christoph Hellwig
We have many WR opcodes that are only supported in kernel space and/or require optional information to be copied into the WR structure. Reject all those not explicitly handled so that we can't pass invalid information to drivers. Cc: sta...@vger.kernel.org Signed-off-by: Christoph Hellwig

Re: [PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-08-19 Thread Jason Gunthorpe
On Wed, Aug 19, 2015 at 02:56:24PM +0300, Sagi Grimberg wrote: On 7/23/2015 8:55 PM, Jason Gunthorpe wrote: On Thu, Jul 23, 2015 at 01:15:16PM +0300, Sagi Grimberg wrote: I was hoping we'd move the DMA flush and translate into here and make it mandatory. Is there any reason not to do that?

Re: [PATCH 1/3] IB/uverbs: reject invalid or unknown opcodes

2015-08-19 Thread Christoph Hellwig
On Wed, Aug 19, 2015 at 11:46:14AM -0600, Jason Gunthorpe wrote: Reviewed-by: Jason Gunthorpe jguntho...@obsidianresearch.com AFAIK, this path is rarely (never?) actually used. I think all the drivers we have can post directly from userspace. Oh, interesting. Is there any chance to

Re: [PATCH 1/3] IB/uverbs: reject invalid or unknown opcodes

2015-08-19 Thread Jason Gunthorpe
On Wed, Aug 19, 2015 at 07:48:02PM +0200, Christoph Hellwig wrote: On Wed, Aug 19, 2015 at 11:46:14AM -0600, Jason Gunthorpe wrote: Reviewed-by: Jason Gunthorpe jguntho...@obsidianresearch.com AFAIK, this path is rarely (never?) actually used. I think all the drivers we have can post

Re: [PATCH 3/3] IB: remove xrc_remote_srq_num from struct ib_send_wr

2015-08-19 Thread Jason Gunthorpe
On Wed, Aug 19, 2015 at 06:37:34PM +0200, Christoph Hellwig wrote: The field is only initialized in mlx, but never used. If we want to add proper XRC support it should be done with a new struct ib_xrc_wr. This shrinks the various WR structures by another 4 bytes. Reviewed-by: Jason

Re: [PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-08-19 Thread Christoph Hellwig
On Wed, Aug 19, 2015 at 07:09:18PM +0300, Sagi Grimberg wrote: Ok, I was also thinking on moving the access flags to the work request again. Yes, with the current code I don't think we need it in the MR. I'd prefer to get this right with a different helper like Steve suggested: int

Re: [PATCH 1/3] IB/uverbs: reject invalid or unknown opcodes

2015-08-19 Thread Jason Gunthorpe
On Wed, Aug 19, 2015 at 06:37:32PM +0200, Christoph Hellwig wrote: We have many WR opcodes that are only supported in kernel space and/or require optional information to be copied into the WR structure. Reject all those not explicitly handled so that we can't pass invalid information to

Re: [PATCH for-next V8 6/6] IB/ucma: HW Device hot-removal support

2015-08-19 Thread Jason Gunthorpe
On Wed, Aug 19, 2015 at 04:59:11PM +0300, Yishai Hadas wrote: On 8/18/2015 8:50 PM, Jason Gunthorpe wrote: On Thu, Aug 13, 2015 at 06:32:07PM +0300, Yishai Hadas wrote: @@ -501,10 +586,24 @@ static ssize_t ucma_destroy_id(struct ucma_file *file, const char __user *inbuf, + if

RE: [PATCH 1/3] IB/uverbs: reject invalid or unknown opcodes

2015-08-19 Thread Hefty, Sean
AFAIK, this path is rarely (never?) actually used. I think all the drivers we have can post directly from userspace. I didn't think the ipath or qib drivers post from userspace. -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to