aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/isert/ib_isert.h
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-12-02 16:57:40 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2014-12-12 23:32:29 -0800
commit4a295bae7e72d870354d337fe42360b0e4441e57 (patch)
treec44885572d78fb240ca2cc998d78f08906272b81 /drivers/infiniband/ulp/isert/ib_isert.h
parentiser-target: Cast wr_id with uintptr_t instead of unsinged long (diff)
downloadlinux-dev-4a295bae7e72d870354d337fe42360b0e4441e57.tar.xz
linux-dev-4a295bae7e72d870354d337fe42360b0e4441e57.zip
iser-target: Centralize completion elements to a context
A pre-step before going to a single CQ. Also this makes the code a little more simple to read. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/infiniband/ulp/isert/ib_isert.h')
-rw-r--r--drivers/infiniband/ulp/isert/ib_isert.h30
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.h b/drivers/infiniband/ulp/isert/ib_isert.h
index b3735a07ca47..3f93cb0a0f03 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.h
+++ b/drivers/infiniband/ulp/isert/ib_isert.h
@@ -159,23 +159,33 @@ struct isert_conn {
#define ISERT_MAX_CQ 64
-struct isert_cq_desc {
- struct isert_device *device;
- int cq_index;
- struct work_struct cq_rx_work;
- struct work_struct cq_tx_work;
+/**
+ * struct isert_comp - iSER completion context
+ *
+ * @device: pointer to device handle
+ * @rx_cq: RX completion queue
+ * @tx_cq: TX completion queue
+ * @active_qps: Number of active QPs attached
+ * to completion context
+ * @rx_work: RX work handle
+ * @tx_work: TX work handle
+ */
+struct isert_comp {
+ struct isert_device *device;
+ struct ib_cq *rx_cq;
+ struct ib_cq *tx_cq;
+ int active_qps;
+ struct work_struct rx_work;
+ struct work_struct tx_work;
};
struct isert_device {
int use_fastreg;
bool pi_capable;
- int cqs_used;
int refcount;
- int cq_active_qps[ISERT_MAX_CQ];
struct ib_device *ib_device;
- struct ib_cq *dev_rx_cq[ISERT_MAX_CQ];
- struct ib_cq *dev_tx_cq[ISERT_MAX_CQ];
- struct isert_cq_desc *cq_desc;
+ struct isert_comp *comps;
+ int comps_used;
struct list_head dev_node;
struct ib_device_attr dev_attr;
int (*reg_rdma_mem)(struct iscsi_conn *conn,