summaryrefslogtreecommitdiff
path: root/drivers/infiniband/ulp/iser/iscsi_iser.h
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-10-01 14:02:10 +0300
committerRoland Dreier <roland@purestorage.com>2014-10-09 00:06:07 -0700
commitff3dd52d267165347d6f92a90016e692d074a00c (patch)
tree2edd94cf4b5c3974e6f475e7b82714e9367b09fc /drivers/infiniband/ulp/iser/iscsi_iser.h
parent6aabfa76f5e5281e5db128a34420d8f33b8574f7 (diff)
IB/iser: Use beacon to indicate all completions were consumed
Avoid post_send counting (atomic) in the IO path just to keep track of how many completions we need to consume. Use a beacon post to indicate that all prior posts completed. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iscsi_iser.h')
-rw-r--r--drivers/infiniband/ulp/iser/iscsi_iser.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h
index 1617c5cce8b1..4fcb25604d80 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
@@ -150,6 +150,7 @@
#define ISER_RSV 0x04
#define ISER_FASTREG_LI_WRID 0xffffffffffffffffULL
+#define ISER_BEACON_WRID 0xfffffffffffffffeULL
struct iser_hdr {
u8 flags;
@@ -335,11 +336,11 @@ struct fast_reg_descriptor {
* @cma_id: rdma_cm connection maneger handle
* @qp: Connection Queue-pair
* @post_recv_buf_count: post receive counter
- * @post_send_buf_count: post send counter
* @rx_wr: receive work request for batch posts
* @device: reference to iser device
* @comp: iser completion context
* @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:
@@ -355,11 +356,11 @@ struct ib_conn {
struct rdma_cm_id *cma_id;
struct ib_qp *qp;
int post_recv_buf_count;
- atomic_t post_send_buf_count;
struct ib_recv_wr rx_wr[ISER_MIN_POSTED_RX];
struct iser_device *device;
struct iser_comp *comp;
bool pi_support;
+ struct ib_send_wr beacon;
struct completion flush_comp;
spinlock_t lock;
union {