diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2014-12-02 16:57:43 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-12-12 23:32:31 -0800 |
commit | bdf20e72548cdcca1c16f29ad30c5725fa1d8d11 (patch) | |
tree | a39a28aae26af3b21256a3cdbcdddaba392c7491 /drivers/infiniband/ulp/isert/ib_isert.h | |
parent | 377d8f5c3ef3e1b90db4e1f9faa01d0b0036ea52 (diff) | |
download | blackbird-obmc-linux-bdf20e72548cdcca1c16f29ad30c5725fa1d8d11.tar.gz blackbird-obmc-linux-bdf20e72548cdcca1c16f29ad30c5725fa1d8d11.zip |
iser-target: Remove an atomic operation from the IO path
In order to know that we consumed all the connection completions
we maintain atomic post_send_buf_count for each IO post send. But
we can know that if we post a "beacon" (zero length RECV work request)
after we move the QP into error state and the target does not serve
any new IO. When we consume it, we know we finished all the connection
completion and we can go ahead and destroy stuff.
In error completion handler we now just need to check for ISERT_BEACON_WRID
to arrive and then wait for session commands to cleanup and complete
conn_wait_comp_err.
We reserve another CQ and QP entries to fit the zero length post recv.
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.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.h b/drivers/infiniband/ulp/isert/ib_isert.h index 5c1a31e8df70..fc1d3232f896 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.h +++ b/drivers/infiniband/ulp/isert/ib_isert.h @@ -7,6 +7,7 @@ #define ISERT_RDMA_LISTEN_BACKLOG 10 #define ISCSI_ISER_SG_TABLESIZE 256 #define ISER_FASTREG_LI_WRID 0xffffffffffffffffULL +#define ISER_BEACON_WRID 0xfffffffffffffffeULL enum isert_desc_type { ISCSI_TX_CONTROL, @@ -122,7 +123,6 @@ struct isert_device; struct isert_conn { enum iser_conn_state state; int post_recv_buf_count; - atomic_t post_send_buf_count; u32 responder_resources; u32 initiator_depth; bool pi_support; @@ -155,6 +155,7 @@ struct isert_conn { /* lock to protect fastreg pool */ spinlock_t conn_lock; struct work_struct release_work; + struct ib_recv_wr beacon; }; #define ISERT_MAX_CQ 64 |