From 3bcf9d7a02399b1f07e79f4c4f38fd0322c10509 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 11 Jun 2015 15:43:12 +0000 Subject: [PATCH] Merge r5843 from 3.0.x-iser branch git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x@6245 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/README.iser | 8 ++++++++ iscsi-scst/kernel/isert-scst/iser_rdma.c | 15 +++++++++++++++ iscsi-scst/kernel/isert-scst/isert.h | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/iscsi-scst/README.iser b/iscsi-scst/README.iser index 819b1b574..19bab9a7a 100644 --- a/iscsi-scst/README.iser +++ b/iscsi-scst/README.iser @@ -15,6 +15,14 @@ In order to achieve better performance, it is recommended to specify "QueuedCommands 128" parameter per iSER target, since the transport is very fast and you usually want to connect it to fast backstorage. +Limitations: +------------- +* Bidirectional commands are not supported +* Block size over 512KB is not supported +* Maximum number of concurent login requests that can be handled is 127. + Note that there may be more connections, but only up to 127 login requests + can be handled at the same time. + Troubleshooting: ----------------- diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index 6531c750c..6936fe02b 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -521,6 +521,9 @@ static void isert_handle_wc_error(struct ib_wc *wc) struct isert_wr *wr = _u64_to_ptr(wc->wr_id); struct isert_cmnd *isert_pdu = wr->pdu; struct isert_connection *isert_conn = wr->conn; + struct isert_buf *isert_buf = wr->buf; + struct isert_device *isert_dev = wr->isert_dev; + struct ib_device *ib_dev = isert_dev->ib_dev; TRACE_ENTRY(); @@ -538,11 +541,22 @@ static void isert_handle_wc_error(struct ib_wc *wc) } break; case ISER_WR_RDMA_READ: + if (isert_buf->sg_cnt != 0) { + isert_buf->sg_cnt = 0; + ib_dma_unmap_sg(ib_dev, isert_buf->sg, isert_buf->sg_cnt, + isert_buf->dma_dir); + } isert_pdu_err(&isert_pdu->iscsi); break; case ISER_WR_RECV: /* this should be the Flush, no task has been created yet */ + break; case ISER_WR_RDMA_WRITE: + if (isert_buf->sg_cnt != 0) { + isert_buf->sg_cnt = 0; + ib_dma_unmap_sg(ib_dev, isert_buf->sg, isert_buf->sg_cnt, + isert_buf->dma_dir); + } /* RDMA-WR and SEND response of a READ task are sent together, so when receiving RDMA-WR error, wait until SEND error arrives to complete the task */ @@ -1594,6 +1608,7 @@ void isert_portal_release(struct isert_portal *portal) isert_portal_list_remove(portal); + kfree(portal); module_put(THIS_MODULE); } diff --git a/iscsi-scst/kernel/isert-scst/isert.h b/iscsi-scst/kernel/isert-scst/isert.h index 9570f030c..c083d536d 100644 --- a/iscsi-scst/kernel/isert-scst/isert.h +++ b/iscsi-scst/kernel/isert-scst/isert.h @@ -65,7 +65,7 @@ struct iscsi_conn; -#define ISERT_NR_DEVS 64 +#define ISERT_NR_DEVS 128 struct isert_listener_dev { struct device *dev;