diff options
Diffstat (limited to 'drivers/infiniband/ulp/iser/iscsi_iser.h')
-rw-r--r-- | drivers/infiniband/ulp/iser/iscsi_iser.h | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h index 95c484d0f881..2bc34aa50705 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.h +++ b/drivers/infiniband/ulp/iser/iscsi_iser.h | |||
@@ -213,7 +213,6 @@ struct iser_data_buf { | |||
213 | 213 | ||
214 | /* fwd declarations */ | 214 | /* fwd declarations */ |
215 | struct iser_device; | 215 | struct iser_device; |
216 | struct iser_cq_desc; | ||
217 | struct iscsi_iser_task; | 216 | struct iscsi_iser_task; |
218 | struct iscsi_endpoint; | 217 | struct iscsi_endpoint; |
219 | 218 | ||
@@ -268,20 +267,34 @@ struct iser_conn; | |||
268 | struct ib_conn; | 267 | struct ib_conn; |
269 | struct iscsi_iser_task; | 268 | struct iscsi_iser_task; |
270 | 269 | ||
270 | /** | ||
271 | * struct iser_comp - iSER completion context | ||
272 | * | ||
273 | * @device: pointer to device handle | ||
274 | * @rx_cq: RX completion queue | ||
275 | * @tx_cq: TX completion queue | ||
276 | * @tasklet: Tasklet handle | ||
277 | * @active_qps: Number of active QPs attached | ||
278 | * to completion context | ||
279 | */ | ||
280 | struct iser_comp { | ||
281 | struct iser_device *device; | ||
282 | struct ib_cq *rx_cq; | ||
283 | struct ib_cq *tx_cq; | ||
284 | struct tasklet_struct tasklet; | ||
285 | int active_qps; | ||
286 | }; | ||
287 | |||
271 | struct iser_device { | 288 | struct iser_device { |
272 | struct ib_device *ib_device; | 289 | struct ib_device *ib_device; |
273 | struct ib_pd *pd; | 290 | struct ib_pd *pd; |
274 | struct ib_device_attr dev_attr; | 291 | struct ib_device_attr dev_attr; |
275 | struct ib_cq *rx_cq[ISER_MAX_CQ]; | ||
276 | struct ib_cq *tx_cq[ISER_MAX_CQ]; | ||
277 | struct ib_mr *mr; | 292 | struct ib_mr *mr; |
278 | struct tasklet_struct cq_tasklet[ISER_MAX_CQ]; | ||
279 | struct ib_event_handler event_handler; | 293 | struct ib_event_handler event_handler; |
280 | struct list_head ig_list; /* entry in ig devices list */ | 294 | struct list_head ig_list; /* entry in ig devices list */ |
281 | int refcount; | 295 | int refcount; |
282 | int cq_active_qps[ISER_MAX_CQ]; | 296 | int comps_used; |
283 | int cqs_used; | 297 | struct iser_comp comps[ISER_MAX_CQ]; |
284 | struct iser_cq_desc *cq_desc; | ||
285 | int (*iser_alloc_rdma_reg_res)(struct ib_conn *ib_conn, | 298 | int (*iser_alloc_rdma_reg_res)(struct ib_conn *ib_conn, |
286 | unsigned cmds_max); | 299 | unsigned cmds_max); |
287 | void (*iser_free_rdma_reg_res)(struct ib_conn *ib_conn); | 300 | void (*iser_free_rdma_reg_res)(struct ib_conn *ib_conn); |
@@ -327,6 +340,7 @@ struct fast_reg_descriptor { | |||
327 | * @post_send_buf_count: post send counter | 340 | * @post_send_buf_count: post send counter |
328 | * @rx_wr: receive work request for batch posts | 341 | * @rx_wr: receive work request for batch posts |
329 | * @device: reference to iser device | 342 | * @device: reference to iser device |
343 | * @comp: iser completion context | ||
330 | * @pi_support: Indicate device T10-PI support | 344 | * @pi_support: Indicate device T10-PI support |
331 | * @lock: protects fmr/fastreg pool | 345 | * @lock: protects fmr/fastreg pool |
332 | * @union.fmr: | 346 | * @union.fmr: |
@@ -345,7 +359,7 @@ struct ib_conn { | |||
345 | atomic_t post_send_buf_count; | 359 | atomic_t post_send_buf_count; |
346 | struct ib_recv_wr rx_wr[ISER_MIN_POSTED_RX]; | 360 | struct ib_recv_wr rx_wr[ISER_MIN_POSTED_RX]; |
347 | struct iser_device *device; | 361 | struct iser_device *device; |
348 | int cq_index; | 362 | struct iser_comp *comp; |
349 | bool pi_support; | 363 | bool pi_support; |
350 | spinlock_t lock; | 364 | spinlock_t lock; |
351 | union { | 365 | union { |
@@ -404,11 +418,6 @@ struct iser_page_vec { | |||
404 | int data_size; | 418 | int data_size; |
405 | }; | 419 | }; |
406 | 420 | ||
407 | struct iser_cq_desc { | ||
408 | struct iser_device *device; | ||
409 | int cq_index; | ||
410 | }; | ||
411 | |||
412 | struct iser_global { | 421 | struct iser_global { |
413 | struct mutex device_list_mutex;/* */ | 422 | struct mutex device_list_mutex;/* */ |
414 | struct list_head device_list; /* all iSER devices */ | 423 | struct list_head device_list; /* all iSER devices */ |