summaryrefslogtreecommitdiff
path: root/drivers/infiniband/ulp/iser/iser_initiator.c
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-10-01 14:02:09 +0300
committerRoland Dreier <roland@purestorage.com>2014-10-09 00:06:07 -0700
commit6aabfa76f5e5281e5db128a34420d8f33b8574f7 (patch)
treed2d2276fa85be0bb6921d1f27125250eea47e379 /drivers/infiniband/ulp/iser/iser_initiator.c
parent183cfa434ec90897b1423ce4f916e8a237139133 (diff)
downloadlwn-6aabfa76f5e5281e5db128a34420d8f33b8574f7.tar.gz
lwn-6aabfa76f5e5281e5db128a34420d8f33b8574f7.zip
IB/iser: Use single CQ for RX and TX
This will solve a possible condition where we might miss TX completion (flush error) during session teardown. Since we are using a single CQ, we don't need to actively drain the TX CQ, instead just wait for flush_completion (when counters reach zero) and remove iser_poll_for_flush_errors(). This patch might introduce a minor performance regression on its own, but the next patches will enhance performance using a single CQ for RX and TX. 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/iser_initiator.c')
-rw-r--r--drivers/infiniband/ulp/iser/iser_initiator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c
index 123174570c16..359c0b84f1ac 100644
--- a/drivers/infiniband/ulp/iser/iser_initiator.c
+++ b/drivers/infiniband/ulp/iser/iser_initiator.c
@@ -272,7 +272,8 @@ int iser_alloc_rx_descriptors(struct iser_conn *iser_conn,
if (iser_alloc_login_buf(iser_conn))
goto alloc_login_buf_fail;
- iser_conn->rx_descs = kmalloc(session->cmds_max *
+ iser_conn->num_rx_descs = session->cmds_max;
+ iser_conn->rx_descs = kmalloc(iser_conn->num_rx_descs *
sizeof(struct iser_rx_desc), GFP_KERNEL);
if (!iser_conn->rx_descs)
goto rx_desc_alloc_fail;