diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-08-06 18:32:58 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-08-31 01:12:30 +0300 |
commit | 385ad87d4b637c1ebdb54bc93274fc2c267dfc16 (patch) | |
tree | 215958778dd3dc653da54fe16e5ea59ac4724b16 /drivers/infiniband/ulp/iser/iscsi_iser.h | |
parent | eb6ea8c36c90f022dd9603530286e0707a9c467b (diff) | |
download | linux-385ad87d4b637c1ebdb54bc93274fc2c267dfc16.tar.xz |
IB/iser: Introduce iser registration pool struct
Instead of having it a part of the connection structure,
have it be under a dedicated (embedded) structure in the
connection. A logical separation of the registration pool
and the connection structure.
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 | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h index 9ce090c2d5b5..1fc4c231fb4a 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.h +++ b/drivers/infiniband/ulp/iser/iscsi_iser.h @@ -418,6 +418,33 @@ struct iser_fr_desc { }; /** + * struct iser_fr_pool: connection fast registration pool + * + * @lock: protects fmr/fastreg pool + * @union.fmr: + * @pool: FMR pool for fast registrations + * @page_vec: fast reg page list to hold mapped commands pages + * used for registration + * @union.fastreg: + * @pool: Fast registration descriptors pool for fast + * registrations + * @pool_size: Size of pool + */ +struct iser_fr_pool { + spinlock_t lock; + union { + struct { + struct ib_fmr_pool *pool; + struct iser_page_vec *page_vec; + } fmr; + struct { + struct list_head pool; + int pool_size; + } fastreg; + }; +}; + +/** * struct ib_conn - Infiniband related objects * * @cma_id: rdma_cm connection maneger handle @@ -430,15 +457,7 @@ struct iser_fr_desc { * @pi_support: Indicate device T10-PI support * @beacon: beacon send wr to signal all flush errors were drained * @flush_comp: completes when all connection completions consumed - * @lock: protects fmr/fastreg pool - * @union.fmr: - * @pool: FMR pool for fast registrations - * @page_vec: page vector to hold mapped commands pages - * used for registration - * @union.fastreg: - * @pool: Fast registration descriptors pool for fast - * registrations - * @pool_size: Size of pool + * @fr_pool: connection fast registration poool */ struct ib_conn { struct rdma_cm_id *cma_id; @@ -451,17 +470,7 @@ struct ib_conn { bool pi_support; struct ib_send_wr beacon; struct completion flush_comp; - spinlock_t lock; - union { - struct { - struct ib_fmr_pool *pool; - struct iser_page_vec *page_vec; - } fmr; - struct { - struct list_head pool; - int pool_size; - } fastreg; - }; + struct iser_fr_pool fr_pool; }; /** |