diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-08-06 18:33:01 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-08-30 18:12:31 -0400 |
commit | 81722909c8f78ee2db62373a74ec2ecb709c112e (patch) | |
tree | aa6f676e95c464eae6b29a4939925a6b7c802cc3 /drivers/infiniband/ulp/iser/iscsi_iser.h | |
parent | 7d0483c927f429c7aece47e730eaa91007577d99 (diff) |
IB/iser: Make reg_desc_get a per device routine
As for fmrs we will hold a single registration descriptor
as no need for multiple like in the frwr mode (descriptor
for each task). This change helps unifying the duplicate
registration code paths.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Adir Lev <adirl@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iscsi_iser.h')
-rw-r--r-- | drivers/infiniband/ulp/iser/iscsi_iser.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h index a8c81774ca53..611abaa8e714 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.h +++ b/drivers/infiniband/ulp/iser/iscsi_iser.h @@ -333,6 +333,8 @@ struct iser_comp { * @free_reg_res: Free registration resources * @reg_rdma_mem: Register memory buffers * @unreg_rdma_mem: Un-register memory buffers + * @reg_desc_get: Get a registration descriptor for pool + * @reg_desc_put: Get a registration descriptor to pool */ struct iser_reg_ops { int (*alloc_reg_res)(struct ib_conn *ib_conn, @@ -342,6 +344,9 @@ struct iser_reg_ops { enum iser_data_dir cmd_dir); void (*unreg_rdma_mem)(struct iscsi_iser_task *iser_task, enum iser_data_dir cmd_dir); + struct iser_fr_desc * (*reg_desc_get)(struct ib_conn *ib_conn); + void (*reg_desc_put)(struct ib_conn *ib_conn, + struct iser_fr_desc *desc); }; /** @@ -657,8 +662,13 @@ void iser_free_fastreg_pool(struct ib_conn *ib_conn); u8 iser_check_task_pi_status(struct iscsi_iser_task *iser_task, enum iser_data_dir cmd_dir, sector_t *sector); struct iser_fr_desc * -iser_reg_desc_get(struct ib_conn *ib_conn); +iser_reg_desc_get_fr(struct ib_conn *ib_conn); void -iser_reg_desc_put(struct ib_conn *ib_conn, - struct iser_fr_desc *desc); +iser_reg_desc_put_fr(struct ib_conn *ib_conn, + struct iser_fr_desc *desc); +struct iser_fr_desc * +iser_reg_desc_get_fmr(struct ib_conn *ib_conn); +void +iser_reg_desc_put_fmr(struct ib_conn *ib_conn, + struct iser_fr_desc *desc); #endif |