[openib-general] [PATCH] [DAPL] update to match new event processing APIs

Sean Hefty sean.hefty at intel.com
Thu Sep 8 15:56:12 PDT 2005


The following patch updates DAPL to match the verbs and CM event
processing APIs.

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


Index: dapl/openib/dapl_ib_util.c
===================================================================
--- dapl/openib/dapl_ib_util.c	(revision 3342)
+++ dapl/openib/dapl_ib_util.c	(working copy)
@@ -626,7 +626,7 @@ void dapli_async_event_cb(struct _ib_hca
 				break;
 			}
 		}
-		ibv_put_async_event(&event);
+		ibv_ack_async_event(&event);
 	}
 }
 
Index: dapl/openib/dapl_ib_cm.c
===================================================================
--- dapl/openib/dapl_ib_cm.c	(revision 3342)
+++ dapl/openib/dapl_ib_cm.c	(working copy)
@@ -1199,7 +1199,7 @@ void dapli_cm_event_cb()
 	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " dapli_cm_event()\n");
 
 	/* process one CM event, fairness */
-	if(!ib_cm_event_get_timed(0,&event)) {
+	if(!ib_cm_get_event_timed(0,&event)) {
 		struct dapl_cm_id	*conn;
 		int			ret;
 		dapl_dbg_log(DAPL_DBG_TYPE_CM,
@@ -1215,7 +1215,7 @@ void dapli_cm_event_cb()
 		else 
 			ret = dapli_cm_active_cb(conn,event);
 		
-		ib_cm_event_put(event);
+		ib_cm_ack_event(event);
 
 		if (ret) 
 			ib_cm_destroy_id(conn->cm_id);
Index: dapl/openib/dapl_ib_cq.c
===================================================================
--- dapl/openib/dapl_ib_cq.c	(revision 3342)
+++ dapl/openib/dapl_ib_cq.c	(working copy)
@@ -71,10 +71,6 @@ void dapli_cq_event_cb(struct _ib_hca_tr
 			(!ibv_get_cq_event(hca->ib_ctx, i, 
 					   &ibv_cq, (void*)&evd_ptr))) {
 
-			/* 
-			 * TODO: ibv put event to protect against
-			 * destroy CQ race conditions?
-			 */
 			if (DAPL_BAD_HANDLE(evd_ptr, DAPL_MAGIC_EVD))
 				continue;
 
@@ -82,6 +78,8 @@ void dapli_cq_event_cb(struct _ib_hca_tr
 			dapl_evd_dto_callback ( hca->ib_ctx,
 						evd_ptr->ib_cq_handle,
 						(void*)evd_ptr );
+
+			ibv_ack_cq_events(ibv_cq, 1);
 		} 
 	}
 }






More information about the general mailing list