diff options
author | Israel Rukshin <israelr@mellanox.com> | 2019-06-11 18:52:49 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-06-24 11:49:27 -0300 |
commit | 5a6781a558cc3909851c04a0d44e3a87a35aad94 (patch) | |
tree | c7eeb8491870ee51a3982f03b14ecf466d19b4f1 /drivers/infiniband/core/mr_pool.c | |
parent | IB/iser: Unwind WR union at iser_tx_desc (diff) | |
download | linux-dev-5a6781a558cc3909851c04a0d44e3a87a35aad94.tar.xz linux-dev-5a6781a558cc3909851c04a0d44e3a87a35aad94.zip |
RDMA/core: Add an integrity MR pool support
This is a preparation for adding new signature API to the rw-API.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/mr_pool.c')
-rw-r--r-- | drivers/infiniband/core/mr_pool.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/infiniband/core/mr_pool.c b/drivers/infiniband/core/mr_pool.c index 49d478b2ea94..132ff92626e1 100644 --- a/drivers/infiniband/core/mr_pool.c +++ b/drivers/infiniband/core/mr_pool.c @@ -42,14 +42,18 @@ void ib_mr_pool_put(struct ib_qp *qp, struct list_head *list, struct ib_mr *mr) EXPORT_SYMBOL(ib_mr_pool_put); int ib_mr_pool_init(struct ib_qp *qp, struct list_head *list, int nr, - enum ib_mr_type type, u32 max_num_sg) + enum ib_mr_type type, u32 max_num_sg, u32 max_num_meta_sg) { struct ib_mr *mr; unsigned long flags; int ret, i; for (i = 0; i < nr; i++) { - mr = ib_alloc_mr(qp->pd, type, max_num_sg); + if (type == IB_MR_TYPE_INTEGRITY) + mr = ib_alloc_mr_integrity(qp->pd, max_num_sg, + max_num_meta_sg); + else + mr = ib_alloc_mr(qp->pd, type, max_num_sg); if (IS_ERR(mr)) { ret = PTR_ERR(mr); goto out; |