[PATCH v2 01/12] IB/core: Guarantee that a local_dma_lkey is available

2015-07-30 Thread Jason Gunthorpe
Every single ULP requires a local_dma_lkey to do anything with a QP, so let us ensure one exists for every PD created. If the driver can supply a global local_dma_lkey then use that, otherwise ask the driver to create a local use all physical memory MR associated with the new PD. Signed-off-by: J

Re: [PATCH v2 01/12] IB/core: Guarantee that a local_dma_lkey is available

2015-08-02 Thread Haggai Eran
On 31/07/2015 02:22, Jason Gunthorpe wrote: > int ib_dealloc_pd(struct ib_pd *pd) > { > + if (pd->local_mr) { > + if (ib_dereg_mr(pd->local_mr)) > + return -EBUSY; > + pd->local_mr = NULL; > + } > + It looks like ib_uverbs_alloc_pd calls ib_dev

Re: [PATCH v2 01/12] IB/core: Guarantee that a local_dma_lkey is available

2015-08-03 Thread Jason Gunthorpe
On Sun, Aug 02, 2015 at 04:09:01PM +0300, Haggai Eran wrote: > On 31/07/2015 02:22, Jason Gunthorpe wrote: > > int ib_dealloc_pd(struct ib_pd *pd) > > { > > + if (pd->local_mr) { > > + if (ib_dereg_mr(pd->local_mr)) > > + return -EBUSY; > > + pd->local_mr =