[openib-general] which dapl/udapl changes in trunk should be imported into OFED branch? (patch enclosed)

Jack Morgenstein jackm at mellanox.co.il
Wed May 24 08:06:46 PDT 2006


Hi,

Below is a patch file of differences between the OFED dapl library and the 
openib main trunk dapl library.

Please indicate which of the dapl library changes are necessary for the Intel 
MPI to work correctly in OFED.

Thanks!
- Jack

------------------------

Index: test/dapltest/test/dapl_server.c
===================================================================
--- test/dapltest/test/dapl_server.c	(.../branches/1.0/src/userspace/dapl)	
(revision 7464)
+++ test/dapltest/test/dapl_server.c	(.../trunk/src/userspace/dapl)	(revision 
7464)
@@ -50,7 +50,7 @@ DT_cs_Server (Params_t * params_ptr)
     Started_server_t    *temp_list      = NULL;
     Started_server_t    *pre_list       = NULL;
     unsigned char       *buffp          = NULL;
-    unsigned char       *module         = "DT_cs_Server";
+    char                *module         = "DT_cs_Server";
 
     DAT_DTO_COOKIE	dto_cookie;
     DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
@@ -842,7 +842,7 @@ send_control_data (
 	Per_Server_Data_t   *ps_ptr,
 	Per_Test_Data_t     *pt_ptr)
 {
-    unsigned char       *module         = "send_control_data";
+    char                *module         = "send_control_data";
     DAT_DTO_COOKIE	dto_cookie;
     DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
 
Index: test/dapltest/test/dapl_bpool.c
===================================================================
--- test/dapltest/test/dapl_bpool.c	(.../branches/1.0/src/userspace/dapl)	
(revision 7464)
+++ test/dapltest/test/dapl_bpool.c	(.../trunk/src/userspace/dapl)	(revision 
7464)
@@ -56,7 +56,7 @@ DT_BpoolAlloc (
 	   DAT_BOOLEAN        enable_rdma_write,
 	   DAT_BOOLEAN        enable_rdma_read)
 {
-    unsigned char           *module = "DT_BpoolAlloc";
+    char                    *module = "DT_BpoolAlloc";
     unsigned char           *alloc_ptr = 0;
     Bpool                   *bpool_ptr = 0;
     DAT_COUNT                alloc_size;
@@ -254,7 +254,7 @@ DT_Bpool_Destroy (Per_Test_Data_t * pt_p
 		  DT_Tdep_Print_Head *phead,
 		  Bpool * bpool_ptr)
 {
-    unsigned char *module = "DT_Bpool_Destroy";
+    char           *module = "DT_Bpool_Destroy";
     bool 	   rval = true;
 
     if (bpool_ptr)
Index: test/dapltest/test/dapl_test_util.c
===================================================================
--- test/dapltest/test/dapl_test_util.c	(.../branches/1.0/src/userspace/dapl)	
(revision 7464)
+++ test/dapltest/test/dapl_test_util.c	(.../trunk/src/userspace/dapl)	
(revision 7464)
@@ -38,7 +38,7 @@ DT_query (   Per_Test_Data_t *pt_ptr,
 	    DAT_IA_HANDLE   ia_handle,
 	    DAT_EP_HANDLE   ep_handle)
 {
-    unsigned char   *module = "DT_query";
+    char            *module = "DT_query";
     DAT_EVD_HANDLE  async_evd_hdl;  /* not used */
     DAT_EP_PARAM    ep_params;
     DAT_RETURN      ret;
Index: test/dapltest/test/dapl_client.c
===================================================================
--- test/dapltest/test/dapl_client.c	(.../branches/1.0/src/userspace/dapl)	
(revision 7464)
+++ test/dapltest/test/dapl_client.c	(.../trunk/src/userspace/dapl)	(revision 
7464)
@@ -57,7 +57,7 @@ DT_cs_Client (Params_t * params_ptr,
     Performance_Cmd_t   *Performance_Cmd    = NULL;
     Bpool               *bpool              = NULL;
     DAT_IA_ADDRESS_PTR  server_netaddr      = NULL;
-    unsigned char       *module             = "DT_cs_Client";
+    char                *module             = "DT_cs_Client";
     unsigned int	did_connect	    = 0;
     unsigned int	retry_cnt	    = 0;
     DAT_DTO_COOKIE	dto_cookie;
Index: test/dapltest/test/dapl_transaction_util.c
===================================================================
--- test/dapltest/test/dapl_transaction_util.c	
(.../branches/1.0/src/userspace/dapl)	(revision 7464)
+++ test/dapltest/test/dapl_transaction_util.c	(.../trunk/src/userspace/dapl)	
(revision 7464)
@@ -641,7 +641,7 @@ DT_handle_rdma_op (DT_Tdep_Print_Head *p
  */
 bool
 DT_check_params (Per_Test_Data_t  *pt_ptr,
-		unsigned char	 *module)
+		 char 		  *module)
 {
     Transaction_Cmd_t * cmd	    = &pt_ptr->Params.u.Transaction_Cmd;
     unsigned long	num_recvs   = 0U;
Index: test/dapltest/test/dapl_transaction_test.c
===================================================================
--- test/dapltest/test/dapl_transaction_test.c	
(.../branches/1.0/src/userspace/dapl)	(revision 7464)
+++ test/dapltest/test/dapl_transaction_test.c	(.../trunk/src/userspace/dapl)	
(revision 7464)
@@ -972,38 +972,42 @@ retry:
 	}   /* end foreach op */
 
 	/*
-	 * Send our memory info (synchronously)
+	 * Send our memory info. The client performs the first send to comply
+	 * with the iWARP MPA protocol's "Connection Startup Rules".
 	 */
 	DT_Tdep_PT_Debug (1,(phead,"Test[" F64x "]: Sending %s Memory Info\n",
 			test_ptr->base_port,
 			test_ptr->is_server ? "Server" : "Client"));
 
-	/* post the send buffer */
-	if (!DT_post_send_buffer (phead,
+	if (!test_ptr->is_server ) {
+
+	    /* post the send buffer */
+	    if (!DT_post_send_buffer (phead,
 		    		  test_ptr->ep_context[i].ep_handle,
 				  test_ptr->ep_context[i].bp,
 				  RMI_SEND_BUFFER_ID,
 				  buff_size))
-	{
-	    /* error message printed by DT_post_send_buffer */
-	    goto test_failure;
-	}
-	/* reap the send and verify it */
-	dto_cookie.as_64 = LZERO;
-	dto_cookie.as_ptr =
-	    (DAT_PVOID) DT_Bpool_GetBuffer (
-		test_ptr->ep_context[i].bp,
-		RMI_SEND_BUFFER_ID);
-	if (!DT_dto_event_wait (phead, test_ptr->reqt_evd_hdl, &dto_stat) ||
-	    !DT_dto_check ( phead,
+	    {
+	        /* error message printed by DT_post_send_buffer */
+	        goto test_failure;
+	    }
+	    /* reap the send and verify it */
+	    dto_cookie.as_64 = LZERO;
+	    dto_cookie.as_ptr =
+	        (DAT_PVOID) DT_Bpool_GetBuffer (
+		    test_ptr->ep_context[i].bp,
+		    RMI_SEND_BUFFER_ID);
+	    if (!DT_dto_event_wait (phead, test_ptr->reqt_evd_hdl, &dto_stat) ||
+	        !DT_dto_check ( phead,
 			    &dto_stat,
 			    test_ptr->ep_context[i].ep_handle,
 			    buff_size,
 			    dto_cookie,
 			    test_ptr->is_server ? "Client_Mem_Info_Send"
 						: "Server_Mem_Info_Send"))
-	{
-	    goto test_failure;
+	    {
+	        goto test_failure;
+	    }
 	}
 
 	/*
@@ -1029,6 +1033,36 @@ retry:
 	    goto test_failure;
 	}
 
+	if (test_ptr->is_server ) {
+	    /* post the send buffer */
+	    if (!DT_post_send_buffer (phead,
+		    		  test_ptr->ep_context[i].ep_handle,
+				  test_ptr->ep_context[i].bp,
+				  RMI_SEND_BUFFER_ID,
+				  buff_size))
+	    {
+	        /* error message printed by DT_post_send_buffer */
+	        goto test_failure;
+	    }
+	    /* reap the send and verify it */
+	    dto_cookie.as_64 = LZERO;
+	    dto_cookie.as_ptr =
+	        (DAT_PVOID) DT_Bpool_GetBuffer (
+		    test_ptr->ep_context[i].bp,
+		    RMI_SEND_BUFFER_ID);
+	    if (!DT_dto_event_wait (phead, test_ptr->reqt_evd_hdl, &dto_stat) ||
+	        !DT_dto_check ( phead,
+			    &dto_stat,
+			    test_ptr->ep_context[i].ep_handle,
+			    buff_size,
+			    dto_cookie,
+			    test_ptr->is_server ? "Client_Mem_Info_Send"
+						: "Server_Mem_Info_Send"))
+	    {
+	        goto test_failure;
+	    }
+	}
+
 	/*
 	 * Extract what we need
 	 */
Index: test/dapltest/include/dapl_proto.h
===================================================================
--- test/dapltest/include/dapl_proto.h	(.../branches/1.0/src/userspace/dapl)	
(revision 7464)
+++ test/dapltest/include/dapl_proto.h	(.../trunk/src/userspace/dapl)	
(revision 7464)
@@ -524,8 +524,8 @@ bool            DT_handle_rdma_op (DT_Td
 					int op_indx,
 					bool poll);
 
-bool            DT_check_params (Per_Test_Data_t     *pt_ptr,
-				    unsigned char	*module);
+bool            DT_check_params (Per_Test_Data_t *pt_ptr,
+				 char *module);
 
 void        	DT_Test_Error (void);
 
Index: test/dtest/dtest.c
===================================================================
--- test/dtest/dtest.c	(.../branches/1.0/src/userspace/dapl)	(revision 7464)
+++ test/dtest/dtest.c	(.../trunk/src/userspace/dapl)	(revision 7464)
@@ -33,6 +33,7 @@
  */
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <netdb.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -40,6 +41,7 @@
 #include <arpa/inet.h>
 #include <sys/mman.h>
 #include <getopt.h>
+#include <inttypes.h>
 
 #ifndef DAPL_PROVIDER
 #define DAPL_PROVIDER "OpenIB-ib0"
@@ -546,7 +548,7 @@ send_msg(   void                    *dat
 
        if ((event.event_data.dto_completion_event_data.transfered_length != 
size ) ||
            (event.event_data.dto_completion_event_data.user_cookie.as_64 != 
0xaaaa )) {
-           fprintf(stderr, "%d: ERROR: DTO len %d or cookie %x\n",
+           fprintf(stderr, "%d: ERROR: DTO len %d or cookie " PRIx64 "\n",
                getpid(),
                event.event_data.dto_completion_event_data.transfered_length,
                event.event_data.dto_completion_event_data.user_cookie.as_64 );
@@ -833,7 +835,7 @@ connect_ep( char *hostname, int conn_id 
                sizeof( DAT_RMR_TRIPLET )) ||
        (event.event_data.dto_completion_event_data.user_cookie.as_64 !=
                recv_msg_index) ) {
-       fprintf(stderr,"ERR recv event: len=%d cookie=%d expected %d/%d\n",
+       fprintf(stderr,"ERR recv event: len=%d cookie=" PRIx64 " expected 
%d/%d\n",
            (int)event.event_data.dto_completion_event_data.transfered_length,
            (int)event.event_data.dto_completion_event_data.user_cookie.as_64,
            sizeof(DAT_RMR_TRIPLET), recv_msg_index );
@@ -1045,7 +1047,7 @@ do_rdma_write_with_msg( )
 
        if ( (event.event_data.dto_completion_event_data.transfered_length != 
sizeof( DAT_RMR_TRIPLET )) ||
             (event.event_data.dto_completion_event_data.user_cookie.as_64 != 
recv_msg_index) ) { +
-           fprintf(stderr,"unexpected event data for receive: len=%d 
cookie=%d exp %d/%d\n",
+           fprintf(stderr,"unexpected event data for receive: len=%d cookie=" 
PRIx64 " exp %d/%d\n",
                (int)event.event_data.dto_completion_event_data.transfered_length,
                (int)event.event_data.dto_completion_event_data.user_cookie.as_64,
                sizeof(DAT_RMR_TRIPLET), recv_msg_index );
@@ -1155,7 +1157,7 @@ do_rdma_read_with_msg( )
 	    }
 	    if ((event.event_data.dto_completion_event_data.transfered_length != 
buf_len ) ||
 		(event.event_data.dto_completion_event_data.user_cookie.as_64 != 0x9999 )) 
{
-		fprintf(stderr, "%d: ERROR: DTO len %d or cookie %x\n", 
+		fprintf(stderr, "%d: ERROR: DTO len %d or cookie " PRIx64 "\n", 
 			getpid(),
 			event.event_data.dto_completion_event_data.transfered_length,
 			event.event_data.dto_completion_event_data.user_cookie.as_64 );
@@ -1237,7 +1239,7 @@ do_rdma_read_with_msg( )
        if ( (event.event_data.dto_completion_event_data.transfered_length != 
sizeof( DAT_RMR_TRIPLET )) ||
             (event.event_data.dto_completion_event_data.user_cookie.as_64 != 
recv_msg_index) ) {
 
-           fprintf(stderr,"unexpected event data for receive: len=%d 
cookie=%d exp %d/%d\n",
+           fprintf(stderr,"unexpected event data for receive: len=%d cookie=" 
PRIx64 " exp %d/%d\n",
                (int)event.event_data.dto_completion_event_data.transfered_length,
                (int)event.event_data.dto_completion_event_data.user_cookie.as_64,
                sizeof(DAT_RMR_TRIPLET), recv_msg_index );
@@ -1272,9 +1274,9 @@ do_ping_pong_msg( )
     DAT_DTO_COOKIE     cookie;
     DAT_LMR_TRIPLET    l_iov;
     DAT_RETURN         ret;
-    int                        i;
-    unsigned char      *snd_buf;
-    unsigned char      *rcv_buf;
+    int                i;
+    char               *snd_buf;
+    char               *rcv_buf;
 
     printf("\n %d PING DATA with SEND MSG\n\n",getpid());
 
@@ -1389,7 +1391,7 @@ do_ping_pong_msg( )
            != buf_len) ||
            (event.event_data.dto_completion_event_data.user_cookie.as_64
            != burst_msg_index) )  {
-           fprintf(stderr,"ERR: recv event: len=%d cookie=%d exp %d/%d\n",
+           fprintf(stderr,"ERR: recv event: len=%d cookie=" PRIx64 " exp 
%d/%d\n",
                (int)event.event_data.dto_completion_event_data.transfered_length,
                (int)event.event_data.dto_completion_event_data.user_cookie.as_64,
                buf_len, burst_msg_index );
Index: dapl/common/dapl_ep_create.c
===================================================================
--- dapl/common/dapl_ep_create.c	(.../branches/1.0/src/userspace/dapl)	
(revision 7464)
+++ dapl/common/dapl_ep_create.c	(.../trunk/src/userspace/dapl)	(revision 
7464)
@@ -310,7 +310,10 @@ dapl_ep_create (
      *
      * N.B. This should really be done by a util routine.
      */
-    dapl_os_atomic_inc (& ((DAPL_EVD *)connect_evd_handle)->evd_ref_count);
+    if (connect_evd_handle != DAT_HANDLE_NULL)
+    {
+	dapl_os_atomic_inc (& ((DAPL_EVD *)connect_evd_handle)->evd_ref_count);
+    }
     /* Optional handles */
     if (recv_evd_handle != DAT_HANDLE_NULL)
     {
Index: dapl/common/dapl_ep_util.c
===================================================================
--- dapl/common/dapl_ep_util.c	(.../branches/1.0/src/userspace/dapl)	(revision 
7464)
+++ dapl/common/dapl_ep_util.c	(.../trunk/src/userspace/dapl)	(revision 7464)
@@ -39,6 +39,7 @@
 #include "dapl_cookie.h"
 #include "dapl_adapter_util.h"
 #include "dapl_evd_util.h"
+#include "dapl_cr_util.h"               /* for callback routine */
 
 /*
  * Local definitions
@@ -570,6 +571,65 @@ bail:
 #endif /* DAPL_DBG_IO_TRC */
 
 /*
+ * Generate a disconnect event on abruct close for older verbs providers 
+ * that do not do it automatically.
+ */
+
+void
+dapl_ep_legacy_post_disconnect(
+    DAPL_EP		*ep_ptr,
+    DAT_CLOSE_FLAGS	disconnect_flags)
+{
+    ib_cm_events_t	ib_cm_event;
+    DAPL_CR		*cr_ptr;
+
+    /*
+     * Acquire the lock and make sure we didn't get a callback
+     * that cleaned up.
+     */
+    dapl_os_lock ( &ep_ptr->header.lock );
+    if (disconnect_flags == DAT_CLOSE_ABRUPT_FLAG &&
+	ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECT_PENDING )
+    {
+	/*
+	 * If this is an ABRUPT close, the provider will not generate
+	 * a disconnect message so we do it manually here. Just invoke
+	 * the CM callback as it will clean up the appropriate
+	 * data structures, reset the state, and generate the event
+	 * on the way out. Obtain the provider dependent cm_event to 
+	 * pass into the callback for a disconnect.
+	 */
+	ib_cm_event = dapls_ib_get_cm_event (DAT_CONNECTION_EVENT_DISCONNECTED);
+
+	cr_ptr = ep_ptr->cr_ptr;
+	dapl_os_unlock ( &ep_ptr->header.lock );
+
+	if (cr_ptr != NULL)
+	{
+	    dapl_dbg_log (DAPL_DBG_TYPE_API | DAPL_DBG_TYPE_CM,
+		"    dapl_ep_disconnect force callback on EP %p CM handle %x\n",
+		 ep_ptr, cr_ptr->ib_cm_handle);
+
+	    dapls_cr_callback (cr_ptr->ib_cm_handle,
+			       ib_cm_event,
+			       NULL,
+			       cr_ptr->sp_ptr);
+	}
+	else
+	{
+	    dapl_evd_connection_callback (ep_ptr->cm_handle,
+					  ib_cm_event,
+					  NULL,
+					  (void *) ep_ptr);
+	}
+    }
+    else
+    {
+	dapl_os_unlock ( &ep_ptr->header.lock );
+    }
+}
+
+/*
  * Local variables:
  *  c-indent-level: 4
  *  c-basic-offset: 4
Index: dapl/common/dapl_ep_util.h
===================================================================
--- dapl/common/dapl_ep_util.h	(.../branches/1.0/src/userspace/dapl)	(revision 
7464)
+++ dapl/common/dapl_ep_util.h	(.../trunk/src/userspace/dapl)	(revision 7464)
@@ -77,4 +77,9 @@ DAT_RETURN_SUBTYPE
 dapls_ep_state_subtype(
     IN  DAPL_EP			*ep_ptr );
 
+extern void
+dapl_ep_legacy_post_disconnect(
+    DAPL_EP		*ep_ptr,
+    DAT_CLOSE_FLAGS	disconnect_flags);
+
 #endif /*  _DAPL_EP_UTIL_H_ */
Index: dapl/common/dapl_init.h
===================================================================
--- dapl/common/dapl_init.h	(.../branches/1.0/src/userspace/dapl)	(revision 
7464)
+++ dapl/common/dapl_init.h	(.../trunk/src/userspace/dapl)	(revision 7464)
@@ -48,4 +48,10 @@ extern void 
 DAT_PROVIDER_FINI_FUNC_NAME (
     IN const DAT_PROVIDER_INFO * );
 
+extern void
+dapl_init ( void ) ;
+
+extern void
+dapl_fini ( void ) ;
+
 #endif
Index: dapl/common/dapl_ep_disconnect.c
===================================================================
--- dapl/common/dapl_ep_disconnect.c	(.../branches/1.0/src/userspace/dapl)	
(revision 7464)
+++ dapl/common/dapl_ep_disconnect.c	(.../trunk/src/userspace/dapl)	(revision 
7464)
@@ -42,7 +42,6 @@
 #include "dapl_sp_util.h"
 #include "dapl_evd_util.h"
 #include "dapl_adapter_util.h"
-#include "dapl_cr_util.h"		/* for callback routine */
 
 /*
  * dapl_ep_disconnect
@@ -70,8 +69,6 @@ dapl_ep_disconnect (
 {
     DAPL_EP		*ep_ptr;
     DAPL_EVD		*evd_ptr;
-    DAPL_CR		*cr_ptr;
-    ib_cm_events_t	ib_cm_event;
     DAT_RETURN		dat_status;
 
     dapl_dbg_log (DAPL_DBG_TYPE_API | DAPL_DBG_TYPE_CM,
@@ -175,51 +172,6 @@ dapl_ep_disconnect (
     dapl_os_unlock ( &ep_ptr->header.lock );
     dat_status =  dapls_ib_disconnect ( ep_ptr, disconnect_flags );
 
-    /*
-     * Reacquire the lock and make sure we didn't get a callback
-     * that cleaned up.
-     */
-    dapl_os_lock ( &ep_ptr->header.lock );
-    if (disconnect_flags == DAT_CLOSE_ABRUPT_FLAG &&
-	ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECT_PENDING )
-    {
-	/*
-	 * If this is an ABRUPT close, the provider will not generate
-	 * a disconnect message so we do it manually here. Just invoke
-	 * the CM callback as it will clean up the appropriate
-	 * data structures, reset the state, and generate the event
-	 * on the way out. Obtain the provider dependent cm_event to 
-	 * pass into the callback for a disconnect.
-	 */
-	ib_cm_event = dapls_ib_get_cm_event (DAT_CONNECTION_EVENT_DISCONNECTED);
-
-	cr_ptr = ep_ptr->cr_ptr;
-	dapl_os_unlock ( &ep_ptr->header.lock );
-
-	if (cr_ptr != NULL)
-	{
-	    dapl_dbg_log (DAPL_DBG_TYPE_API | DAPL_DBG_TYPE_CM,
-		"    dapl_ep_disconnect force callback on EP %p CM handle %x\n",
-		 ep_ptr, cr_ptr->ib_cm_handle);
-
-	    dapls_cr_callback (cr_ptr->ib_cm_handle,
-			       ib_cm_event,
-			       NULL,
-			       cr_ptr->sp_ptr);
-	}
-	else
-	{
-	    dapl_evd_connection_callback (ep_ptr->cm_handle,
-					  ib_cm_event,
-					  NULL,
-					  (void *) ep_ptr);
-	}
-    }
-    else
-    {
-	dapl_os_unlock ( &ep_ptr->header.lock );
-    }
-
 bail:
     dapl_dbg_log (DAPL_DBG_TYPE_RTN | DAPL_DBG_TYPE_CM,
 		  "dapl_ep_disconnect () returns 0x%x\n",
Index: dapl/openib/dapl_ib_cm.c
===================================================================
--- dapl/openib/dapl_ib_cm.c	(.../branches/1.0/src/userspace/dapl)	(revision 
7464)
+++ dapl/openib/dapl_ib_cm.c	(.../trunk/src/userspace/dapl)	(revision 7464)
@@ -52,6 +52,7 @@
 
 #include "dapl.h"
 #include "dapl_adapter_util.h"
+#include "dapl_ep_util.h"
 #include "dapl_evd_util.h"
 #include "dapl_cr_util.h"
 #include "dapl_name_service.h"
@@ -689,6 +690,8 @@ dapls_ib_disconnect (
 				     ep_ptr->cm_handle, status);
 	}
 
+	dapl_ep_legacy_post_disconnect(ep_ptr, close_flags)
+
 	return DAT_SUCCESS;
 }
 
Index: dapl/openib_cma/dapl_ib_cm.c
===================================================================
--- dapl/openib_cma/dapl_ib_cm.c	(.../branches/1.0/src/userspace/dapl)	
(revision 7464)
+++ dapl/openib_cma/dapl_ib_cm.c	(.../trunk/src/userspace/dapl)	(revision 
7464)
@@ -287,14 +287,24 @@ static void dapli_cm_active_cb(struct da
 					     NULL, conn->ep);
 		break;
 	case RDMA_CM_EVENT_REJECTED:
+	{
+		ib_cm_events_t cm_event;
+
+		/* no device type specified so assume IB for now */
+		if (event->status == 28) /* IB_CM_REJ_CONSUMER_DEFINED */
+			cm_event = IB_CME_DESTINATION_REJECT_PRIVATE_DATA;
+		else 
+			cm_event = IB_CME_DESTINATION_REJECT;
+
 		dapl_dbg_log(
 			DAPL_DBG_TYPE_WARN,
 			" dapli_cm_active_handler: REJECTED reason=%d\n",	
 			event->status);
-		dapl_evd_connection_callback(conn, IB_CME_DESTINATION_REJECT,
-					     NULL, conn->ep);
+		
+		dapl_evd_connection_callback(conn, cm_event, NULL, conn->ep);
+		
 		break;
-
+	}
 	case RDMA_CM_EVENT_ESTABLISHED:
 			
 		dapl_dbg_log(DAPL_DBG_TYPE_CM, 
@@ -383,6 +393,14 @@ static void dapli_cm_passive_cb(struct d
 		break;
 
 	case RDMA_CM_EVENT_REJECTED:
+	{
+		ib_cm_events_t cm_event;
+
+		/* no device type specified so assume IB for now */
+		if (event->status == 28) /* IB_CM_REJ_CONSUMER_DEFINED */
+			cm_event = IB_CME_DESTINATION_REJECT_PRIVATE_DATA;
+		else 
+			cm_event = IB_CME_DESTINATION_REJECT;
 
 		dapl_dbg_log(
 			DAPL_DBG_TYPE_WARN, 
@@ -397,10 +415,11 @@ static void dapli_cm_passive_cb(struct d
 				&ipaddr->dst_addr)->sin_addr.s_addr),
 			ntohs(((struct sockaddr_in *)
 				&ipaddr->dst_addr)->sin_port));
-
-		dapls_cr_callback(conn, IB_CME_DESTINATION_REJECT, 
-				  NULL, conn->sp);
+		
+		dapls_cr_callback(conn, cm_event, NULL, conn->sp);
+		
 		break;
+	}
 	case RDMA_CM_EVENT_ESTABLISHED:
 		
 		dapl_dbg_log(DAPL_DBG_TYPE_CM, 
Index: dapl/openib_cma/dapl_ib_cq.c
===================================================================
--- dapl/openib_cma/dapl_ib_cq.c	(.../branches/1.0/src/userspace/dapl)	
(revision 7464)
+++ dapl/openib_cma/dapl_ib_cq.c	(.../trunk/src/userspace/dapl)	(revision 
7464)
@@ -481,7 +481,6 @@ dapls_ib_wait_object_wait(IN ib_wait_obj
 {
 	struct dapl_evd	*evd_ptr;
 	struct ibv_cq	*ibv_cq = NULL;
-	void		*ibv_ctx = NULL;
 	int		status = 0; 
 	int		timeout_ms = -1;
 	struct pollfd cq_fd = {
@@ -518,8 +517,8 @@ dapls_ib_wait_object_wait(IN ib_wait_obj
 		status = errno;
 	
 	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, 
-		     " cq_object_wait: RET evd %p ibv_cq %p ibv_ctx %p %s\n",
-		     evd_ptr, ibv_cq,ibv_ctx,strerror(errno));
+		     " cq_object_wait: RET evd %p ibv_cq %p %s\n",
+		     evd_ptr, ibv_cq, strerror(errno));
 	
 	return(dapl_convert_errno(status,"cq_wait_object_wait"));
 
Index: configure.in
===================================================================
--- configure.in	(.../branches/1.0/src/userspace/dapl)	(revision 7464)
+++ configure.in	(.../trunk/src/userspace/dapl)	(revision 7464)
@@ -1,11 +1,11 @@
 dnl Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.57)
-AC_INIT(libdat, 1.2.0, dapl-devel at lists.sourceforge.net)
+AC_INIT(dapl, 1.2.0, dapl-devel at lists.sourceforge.net)
 AC_CONFIG_SRCDIR([dat/udat/udat.c])
 AC_CONFIG_AUX_DIR(config)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libdat, 1.2.0)
+AM_INIT_AUTOMAKE(dapl, 1.2.0)
 
 AM_PROG_LIBTOOL
 
Index: Makefile.am
===================================================================
--- Makefile.am	(.../branches/1.0/src/userspace/dapl)	(revision 7464)
+++ Makefile.am	(.../trunk/src/userspace/dapl)	(revision 7464)
@@ -350,5 +350,5 @@ EXTRA_DIST = dat/common/dat_dictionary.h
 	     dapl/udapl/libdaplscm.map \
 	     libdat.spec.in 
 	     
-dist-hook: libdat.spec LICENSE*.txt
-	cp libdat.spec LICENSE*.txt $(distdir)
+dist-hook: libdat.spec 
+	cp libdat.spec $(distdir)
Index: libdat.spec.in
===================================================================
--- libdat.spec.in	(.../branches/1.0/src/userspace/dapl)	(revision 7464)
+++ libdat.spec.in	(.../trunk/src/userspace/dapl)	(revision 7464)
@@ -36,7 +36,7 @@
 %define rel     %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
 
 Summary: Userspace DAT and DAPL API.
-Name: libdat
+Name: dapl
 Version: %ver
 Release: %rel
 License: Dual GPL/BSD/CPL
@@ -44,7 +44,6 @@ Group: System Environment/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Source: http://openib.org/downloads/%{name}-%{version}.tar.gz
 Url: http://openib.org/
-BuildRequires: libibverbs-devel librdmacm-devel
 
 %description
 Along with the OpenIB kernel drivers, libdat and libdapl provides a userspace
@@ -53,7 +52,7 @@ RDMA API that supports DAT 1.2 specifica
 %package devel
 Summary: Development files for the libdat and libdapl libraries
 Group: System Environment/Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name} = %{version}-%{release} 
 
 %description devel
 Static libraries and header files for the libdat and libdapl library.
@@ -79,8 +78,8 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(-,root,root)
 %{_libdir}/libda*.so.*
-%config(noreplace) %{_sysconfdir}/dat.conf
-%doc AUTHORS COPYING README LICENSE*.txt
+%{_sysconfdir}/dat.conf
+%doc AUTHORS COPYING ChangeLog NEWS README
 
 %files devel
 %defattr(-,root,root,-)
@@ -96,3 +95,4 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/dat/udat.h
 %{_includedir}/dat/udat_redirection.h
 %{_includedir}/dat/udat_vendor_specific.h
+%{_sysconfdir}/dat.conf



More information about the general mailing list