[openib-general] [PATCH 2/4] mthca: forward QP COMM_EST and PATH_MIG events to cm_handler

Sean Hefty sean.hefty at intel.com
Fri Jul 21 14:50:50 PDT 2006


Forwards communication established and path migration events on a
QP for dispatching to the CM event handler.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
I couldn't locate where asynchronous QP events were handled in 
the ipath driver.  If a lower level driver does not dispatch these
events, then connections over that device must wait until an RTU
is received during connection establishment.

Index: hw/mthca/mthca_qp.c
===================================================================
--- hw/mthca/mthca_qp.c	(revision 8626)
+++ hw/mthca/mthca_qp.c	(working copy)
@@ -246,12 +246,16 @@ void mthca_qp_event(struct mthca_dev *de
 		return;
 	}
 
-	if (event_type == IB_EVENT_PATH_MIG)
-		qp->port = qp->alt_port;
-
 	event.device      = &dev->ib_dev;
 	event.event       = event_type;
 	event.element.qp  = &qp->ibqp;
+
+	if (event_type == IB_EVENT_PATH_MIG) {
+		qp->port = qp->alt_port;
+		ib_dispatch_cm_event(&event);
+	} else if (event_type == IB_EVENT_COMM_EST)
+		ib_dispatch_cm_event(&event);
+
 	if (qp->ibqp.event_handler)
 		qp->ibqp.event_handler(&event, qp->ibqp.qp_context);
 





More information about the general mailing list