[openib-general] [PATCH 2/2] IB/iser: bugfix for the reconnect flow
Or Gerlitz
ogerlitz at voltaire.com
Tue Jun 20 02:35:51 PDT 2006
for iscsi reconnect flow the sequence of calls would be conn stop/bind/start
i.e conn create is not called; fixed the post receive code to take that into
account, also moved setting conn->recv_lock into conn bind which is called for
both connect and reconnect flows.
Signed-off-by: Erez Zilber <erezz at voltaire.com>
Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
Index: infiniband-git/drivers/infiniband/ulp/iser/iscsi_iser.c
===================================================================
--- infiniband-git.orig/drivers/infiniband/ulp/iser/iscsi_iser.c 2006-06-20 12:27:42.000000000 +0300
+++ infiniband-git/drivers/infiniband/ulp/iser/iscsi_iser.c 2006-06-20 12:28:14.000000000 +0300
@@ -311,8 +311,6 @@
/* currently this is the only field which need to be initiated */
rwlock_init(&iser_conn->lock);
- conn->recv_lock = &iser_conn->lock;
-
conn->dd_data = iser_conn;
iser_conn->iscsi_conn = conn;
@@ -363,6 +361,8 @@
ib_conn->iser_conn = iser_conn;
iser_conn->ib_conn = ib_conn;
+ conn->recv_lock = &iser_conn->lock;
+
return 0;
}
Index: infiniband-git/drivers/infiniband/ulp/iser/iser_initiator.c
===================================================================
--- infiniband-git.orig/drivers/infiniband/ulp/iser/iser_initiator.c 2006-06-20 12:27:42.000000000 +0300
+++ infiniband-git/drivers/infiniband/ulp/iser/iser_initiator.c 2006-06-20 12:28:14.000000000 +0300
@@ -232,8 +232,11 @@
}
rx_desc->type = ISCSI_RX;
- /* for the login sequence we must support rx of upto 8K */
- if (conn->c_stage == ISCSI_CONN_INITIAL_STAGE)
+ /* for the login sequence we must support rx of upto 8K; login is done
+ * after conn create/bind (connect) and conn stop/bind (reconnect),
+ * what's common for both schemes is that the connection is not started
+ */
+ if (conn->c_stage != ISCSI_CONN_STARTED)
rx_data_size = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH;
else /* FIXME till user space sets conn->max_recv_dlength correctly */
rx_data_size = 128;
More information about the general
mailing list