diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2017-03-22 17:07:30 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2017-03-30 20:35:50 -0700 |
commit | 7a56dc8888be23f44158a85b92da45d545cbf548 (patch) | |
tree | 53ff04e53d41f5225f68ec19dfe0ed26ae173be8 /drivers/infiniband/ulp/isert/ib_isert.h | |
parent | 555a65f66c3c4d9dd46a565418b0b655d861a723 (diff) | |
download | lwn-7a56dc8888be23f44158a85b92da45d545cbf548.tar.gz lwn-7a56dc8888be23f44158a85b92da45d545cbf548.zip |
iser-target: avoid posting a recv buffer twice
We pre-allocate our send-queues and might overflow them
in case we have multi work-request operations which tend
to occur for large RDMA transfers over devices with limited
allowed sg elements. When we get to a queue-full condition
we might retry again later, so track our receive buffers
so we don't repost them for a retry case.
Reported-by: Potnuri Bharat Teja <bharat@chelsio.com>
Tested-by: Potnuri Bharat Teja <bharat@chelsio.com>
Reviewed-by: Potnuri Bharat Teja <bharat@chelsio.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
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 c02ada57d7f5..87d994de8c91 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.h +++ b/drivers/infiniband/ulp/isert/ib_isert.h @@ -60,7 +60,7 @@ #define ISER_RX_PAD_SIZE (ISCSI_DEF_MAX_RECV_SEG_LEN + 4096 - \ (ISER_RX_PAYLOAD_SIZE + sizeof(u64) + sizeof(struct ib_sge) + \ - sizeof(struct ib_cqe))) + sizeof(struct ib_cqe) + sizeof(bool))) #define ISCSI_ISER_SG_TABLESIZE 256 @@ -85,6 +85,7 @@ struct iser_rx_desc { u64 dma_addr; struct ib_sge rx_sg; struct ib_cqe rx_cqe; + bool in_use; char pad[ISER_RX_PAD_SIZE]; } __packed; |