diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-10-13 19:11:28 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-10-29 05:27:18 +0300 |
commit | 2eaa1c5647a3fd21684120f63e414367055249c7 (patch) | |
tree | 20f3f736d0893e75ac8441c08c0463482a630399 /drivers/infiniband/hw/ocrdma/ocrdma_verbs.h | |
parent | 1b2cd0fc673c0bf9a37c6456267a7246fdd6a816 (diff) | |
download | linux-2eaa1c5647a3fd21684120f63e414367055249c7.tar.xz |
RDMA/ocrdma: Support the new memory registration API
Support the new memory registration API by allocating a
private page list array in ocrdma_mr and populate it when
ocrdma_map_mr_sg is invoked. Also, support IB_WR_REG_MR
by duplicating IB_WR_FAST_REG_MR, but take the needed
information from different places:
- page_size, iova, length, access flags (ib_mr)
- page array (ocrdma_mr)
- key (ib_reg_wr)
The IB_WR_FAST_REG_MR handlers will be removed later when
all the ULPs will be converted.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_verbs.h')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_verbs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.h b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.h index 308c16857a5d..1b2d3ac10203 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.h +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.h @@ -125,6 +125,9 @@ struct ib_mr *ocrdma_reg_user_mr(struct ib_pd *, u64 start, u64 length, struct ib_mr *ocrdma_alloc_mr(struct ib_pd *pd, enum ib_mr_type mr_type, u32 max_num_sg); +int ocrdma_map_mr_sg(struct ib_mr *ibmr, + struct scatterlist *sg, + int sg_nents); struct ib_fast_reg_page_list *ocrdma_alloc_frmr_page_list(struct ib_device *ibdev, int page_list_len); |