[PATCH] iser fix initiator dlength

Pete Wyckoff pw
Sat Aug 11 16:55:50 CEST 2007


Set the iscsi param max_xmit_dlength from the initiator_rdsl param in
the case of RDMA.  Otherwise the data_rsp_build and r2t_build use the
wrong size in RDMA mode.

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

diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
index 15c3623..a3fa6af 100644
--- a/usr/iscsi/iscsid.c
+++ b/usr/iscsi/iscsid.c
@@ -517,6 +517,14 @@ static void login_finish(struct iscsi_connection *conn)
 				break;
 			}
 		}
+		/*
+		 * data_rsp_build and r2t_build use this parameter
+		 * to size packets going to the initiator.  Set it
+		 * here rather than "if rdma" in those functions.
+		 */
+		if (conn->tp->rdma)
+			conn->session_param[ISCSI_PARAM_MAX_XMIT_DLENGTH].val =
+				conn->session_param[ISCSI_PARAM_INITIATOR_RDSL].val;
 		memcpy(conn->isid, conn->session->isid, sizeof(conn->isid));
 		conn->tsih = conn->session->tsih;
 
-- 
1.5.2.4




More information about the stgt mailing list