[PATCH] ISCSI: Honour MaxRecvDataSegmentLength for NORMAL sessions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix a bug in iscsid.c with regards to MaxRecvDataSegmentLength.
The parsing of this login key only updated the settings for how large PDUs we can send for DISCOVERY sessions.
What we want here is to have the MaxRecvDataSegmentLength to be parsed and applied to NORMAL sessions, not DISCOVERY sessions.

Otherwise, we will always have this clamped down to 8k for all normal sessions  and thus we get a performance issue since TGTD will always send DATA-IN PDUs of just 8kb each.

With this patch, TGTD now honours the setting so that if the initiator specifies MaxDataSegmentLength to something reasonable like 256k, then TGTD will be able to send a single PDU of 256kb instead of a train of 32 8kb PDUs.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
---
 usr/iscsi/iscsid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
index 96abbfc..84476f7 100644
--- a/usr/iscsi/iscsid.c
+++ b/usr/iscsi/iscsid.c
@@ -346,7 +346,7 @@ static void text_scan_login(struct iscsi_connection *conn)
 				continue;
 			}
 			if (idx == ISCSI_PARAM_MAX_XMIT_DLENGTH &&
-			    conn->session_type == SESSION_DISCOVERY)
+			    conn->session_type == SESSION_NORMAL)
 				conn->session_param[idx].val = val;
 			else
 				param_set_val(session_keys,
-- 
1.7.3.1

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux