[ofa-general] [RFC PATCH 5/5] ib/iser: use the rdma-cm new RDMA_ALIGN_WITH_NETDEVICE ha mode
Or Gerlitz
ogerlitz at voltaire.com
Thu May 15 07:26:05 PDT 2008
enhance iser to request for notification on network stack changes which
makes its rdma connection unaligned with the link used by the stack
for the <src,dst> IPs used to establish the connection.
When RDMA_CM_EVENT_NETDEV_CHANGE arrives, just disconnect the connection, following
that the iscsid daemon would reconnect, and the new connection would be well aligned.
Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
Index: linux-2.6.26-rc2/drivers/infiniband/ulp/iser/iser_verbs.c
===================================================================
--- linux-2.6.26-rc2.orig/drivers/infiniband/ulp/iser/iser_verbs.c 2008-05-15 15:10:21.000000000 +0300
+++ linux-2.6.26-rc2/drivers/infiniband/ulp/iser/iser_verbs.c 2008-05-15 15:31:49.000000000 +0300
@@ -476,6 +476,9 @@ static int iser_cma_handler(struct rdma_
case RDMA_CM_EVENT_DEVICE_REMOVAL:
iser_disconnected_handler(cma_id);
break;
+ case RDMA_CM_EVENT_NETDEV_CHANGE:
+ rdma_disconnect(cma_id);
+ break;
default:
iser_err("Unexpected RDMA CM event (%d)\n", event->event);
break;
@@ -534,7 +537,9 @@ int iser_connect(struct iser_conn *ib_
iser_err("rdma_create_id failed: %d\n", err);
goto id_failure;
}
-
+
+ rdma_set_high_availability_mode(ib_conn->cma_id, RDMA_ALIGN_WITH_NETDEVICE);
+
src = (struct sockaddr *)src_addr;
dst = (struct sockaddr *)dst_addr;
err = rdma_resolve_addr(ib_conn->cma_id, src, dst, 1000);
More information about the general
mailing list