diff options
| author | Jason Gunthorpe <jgunthorpe@obsidianresearch.com> | 2015-08-05 14:14:45 -0600 |
|---|---|---|
| committer | Doug Ledford <dledford@redhat.com> | 2015-08-30 18:12:33 -0400 |
| commit | 96249d70dd70496084c7ec1465ec449cd032955a (patch) | |
| tree | 0d49858551021820aad61780788b8b5fdcc04870 /drivers/infiniband/core/uverbs_cmd.c | |
| parent | 7332bed085c68fc76462583a1003c6dca2c31e11 (diff) | |
| download | linux-96249d70dd70496084c7ec1465ec449cd032955a.tar.gz linux-96249d70dd70496084c7ec1465ec449cd032955a.tar.bz2 linux-96249d70dd70496084c7ec1465ec449cd032955a.zip | |
IB/core: Guarantee that a local_dma_lkey is available
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: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Sagi Grimberg <sagig@dev.mellanox.co.il>
Acked-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Tested-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_cmd.c')
| -rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index bbb02ffe87df..258485ee46b2 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -562,6 +562,7 @@ ssize_t ib_uverbs_alloc_pd(struct ib_uverbs_file *file, pd->device = file->device->ib_dev; pd->uobject = uobj; + pd->local_mr = NULL; atomic_set(&pd->usecnt, 0); uobj->object = pd; |
