IB/core: remove ib_get_dma_mr
authorChristoph Hellwig <hch@lst.de>
Mon, 5 Sep 2016 10:56:21 +0000 (12:56 +0200)
committerDoug Ledford <dledford@redhat.com>
Fri, 23 Sep 2016 17:47:44 +0000 (13:47 -0400)
commit5ef990f06bd7e3cf521b5705d898d8e43d04ea90
tree5fb4ffe4a54d1063fd26d08ac95383ab7f11a311
parent11975e0149002b88aa8003bfa6172f49e3351768
IB/core: remove ib_get_dma_mr

We now only use it from ib_alloc_pd to create a local DMA lkey if the
device doesn't provide one, or a global rkey if the ULP requests it.

This patch removes ib_get_dma_mr and open codes the functionality in
ib_alloc_pd so that we can simplify the code and prevent abuse of the
functionality.  As a side effect we can also simplify things by removing
the valid access bit check, and the PD refcounting.

In the future I hope to also remove the per-PD global MR entirely by
shifting this work into the HW drivers, as one step towards avoiding
the struct ib_mr overload for various different use cases.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/verbs.c
include/rdma/ib_verbs.h