[Stgt-devel] [PATCH] iscsi fix xmit param

Pete Wyckoff pw
Wed Aug 15 00:52:06 CEST 2007


This might be a hack.  In fixing the defaults earlier, I put the
SCSI default for MaxRecvDataSegmentLength in place for the
ISCSI_PARAM_MAX_XMIT_DLENGTH.  But really it should be whatever
the initiator tells us.  So override the "minimum" function and
just set the thing directly.  Perhaps this parameter should live
outside the conn->session_param[] structure---there are many exceptions
for it scattered around the code.

Signed-off-by: Pete Wyckoff <pw at osc.edu>
---
 usr/iscsi/iscsid.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
index e092462..a1bae20 100644
--- a/usr/iscsi/iscsid.c
+++ b/usr/iscsi/iscsid.c
@@ -305,7 +305,12 @@ static void text_scan_login(struct iscsi_connection *conn)
 			}
 
 			err = param_check_val(session_keys, idx, &val);
-			err = param_set_val(session_keys, conn->session_param, idx, &val);
+			if (idx == ISCSI_PARAM_MAX_XMIT_DLENGTH)
+				/* just record whatever he wants,
+				 * assuming it fits in the limits */
+				conn->session_param[idx].val = val;
+			else
+				err = param_set_val(session_keys, conn->session_param, idx, &val);
 
 			switch (conn->session_param[idx].state) {
 			case KEY_STATE_START:
-- 
1.5.2.4




More information about the stgt mailing list