[openib-general] [PATCH] [kDAPL] 3/5 per device communication identifiers

Sean Hefty sean.hefty at intel.com
Thu Sep 15 10:44:05 PDT 2005


Patch fixes up kDAPL to use per device cm_id's.

I did not test this, but the changes appear straightforward.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>


Index: linux-kernel/infiniband/ulp/kdapl/ib/dapl_openib_cm.c
===================================================================
--- linux-kernel/infiniband/ulp/kdapl/ib/dapl_openib_cm.c	(revision 3433)
+++ linux-kernel/infiniband/ulp/kdapl/ib/dapl_openib_cm.c	(working copy)
@@ -481,7 +481,8 @@ int dapl_ib_connect(struct dapl_ep *ep,
 	spin_lock_init(&cm_ctx->lock);
 	init_waitqueue_head(&cm_ctx->wait);
 	cm_ctx->ep = ep;
-	cm_ctx->cm_id = ib_create_cm_id(dapl_cm_active_cb_handler, cm_ctx);
+	cm_ctx->cm_id = ib_create_cm_id(ep->qp->device,
+					dapl_cm_active_cb_handler, cm_ctx);
 	if (IS_ERR(cm_ctx->cm_id)) {
 		dapl_dbg_log(DAPL_DBG_TYPE_ERR, " CM ID creation failed\n");
 		kfree(cm_ctx);
@@ -683,7 +684,8 @@ int dapl_ib_setup_conn_listener(struct d
 {
 	int status;
 
-	sp->cm_srvc_handle = ib_create_cm_id(dapl_cm_passive_cb_handler, sp);
+	sp->cm_srvc_handle = ib_create_cm_id(ia->provider->device,
+					     dapl_cm_passive_cb_handler, sp);
 	if (IS_ERR(sp->cm_srvc_handle)) {
 		dapl_dbg_log(DAPL_DBG_TYPE_ERR, " CM ID creation failed\n");
 		return -EAGAIN;






More information about the general mailing list