Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2016-01-06 Thread Sagi Grimberg
ULPs are *already* using the same registrations for both local and remote access. Where? Out of tree? I haven't found anything in-tree for sure. We have that in iSER. iSCSI allows a FirstBurst functionality and iSER as an iSCSI transport is required to support that. The FirstBurst is

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2016-01-06 Thread Jason Gunthorpe
On Wed, Jan 06, 2016 at 05:10:06PM +0200, Sagi Grimberg wrote: > > >>>ULPs are *already* using the same registrations for both local and > >>>remote access. > >> > >>Where? Out of tree? > > > >I haven't found anything in-tree for sure. > > We have that in iSER. > > iSCSI allows a FirstBurst

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2016-01-05 Thread Jason Gunthorpe
On Fri, Dec 25, 2015 at 06:46:07PM +0200, Liran Liss wrote: > > From: Jason Gunthorpe > > > > >fill mr->key by the lkey or rkey based on that and everything will > > > >work fine. > > > > > > But the ULP *can* register a memory buffer with local and remote > > >

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2016-01-05 Thread Christoph Hellwig
On Tue, Jan 05, 2016 at 10:46:36AM -0700, Jason Gunthorpe wrote: > > ULPs are *already* using the same registrations for both local and > > remote access. > > Where? Out of tree? I haven't found anything in-tree for sure. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma"

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-25 Thread Liran Liss
> From: Jason Gunthorpe > > >fill mr->key by the lkey or rkey based on that and everything will > > >work fine. > > > > But the ULP *can* register a memory buffer with local and remote > > access permissions. > Not in the new API. > > If a ULP ever comes along

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Jason Gunthorpe
On Tue, Dec 22, 2015 at 06:58:14PM +0200, Sagi Grimberg wrote: > > >The ULP decides if this MR is going to be used as a lkey or rkey > >by passing IB_REG_LKEY or IB_REG_RKEY. The HCA driver will then > >fill mr->key by the lkey or rkey based on that and everything will > >work fine. > > But the

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Sagi Grimberg
Hi Christoph, While IB supports the notion of returning separate local and remote keys from a memory registration, the iWarp spec doesn't and neither does any of our in-tree HCA drivers [1] nor consumers. Consolidate the in-kernel API to provide only a single key and make everyones life

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Christoph Hellwig
On Tue, Dec 22, 2015 at 11:17:54AM +0200, Sagi Grimberg wrote: > What makes me worried here is that the IB/RoCE specification really > defines different keys for local and remote access. I'm less concerned > about our consumers but more about our providers. We keep seeing new > providers come

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Sagi Grimberg
The ULP decides if this MR is going to be used as a lkey or rkey by passing IB_REG_LKEY or IB_REG_RKEY. The HCA driver will then fill mr->key by the lkey or rkey based on that and everything will work fine. But the ULP *can* register a memory buffer with local and remote access permissions.

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Christoph Hellwig
On Tue, Dec 22, 2015 at 03:50:12PM +0200, Sagi Grimberg wrote: > This is why I said that the problem here is not the ULPs. But if a new > HW comes along with distinction between rkeys and lkeys it will have a > problem. For example a HW allocates two different keys, rkey and lkey. > And, it

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Sagi Grimberg
On 22/12/2015 15:13, Christoph Hellwig wrote: On Tue, Dec 22, 2015 at 11:17:54AM +0200, Sagi Grimberg wrote: What makes me worried here is that the IB/RoCE specification really defines different keys for local and remote access. I'm less concerned about our consumers but more about our

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-11-23 Thread Jason Gunthorpe
On Sun, Nov 22, 2015 at 06:46:48PM +0100, Christoph Hellwig wrote: > While IB supports the notion of returning separate local and remote keys > from a memory registration, the iWarp spec doesn't and neither does any > of our in-tree HCA drivers [1] nor consumers. Consolidate the in-kernel > API

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-11-23 Thread Christoph Hellwig
On Mon, Nov 23, 2015 at 12:41:24PM -0700, Jason Gunthorpe wrote: > I like this too, but, I'm a little worried this makes the API more > confusing - ideally, we'd get rid of all the IB_ACCESS stuff from > within the kernel completely. That's my plan - at least for MRs. The only place still using

[PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-11-22 Thread Christoph Hellwig
While IB supports the notion of returning separate local and remote keys from a memory registration, the iWarp spec doesn't and neither does any of our in-tree HCA drivers [1] nor consumers. Consolidate the in-kernel API to provide only a single key and make everyones life easier. [1] the EHCA