[openib-general] [PATCH] kDAPL: remove DAT_UINT32 and DAT_UINT64

Tom Duffy tduffy at sun.com
Thu May 5 14:08:09 PDT 2005


James, let's start some typedef cleanup.  I will continue in this
fashion if you apply.

This patch removes the use of typedefs DAT_UINT32 and DAT_UINT64 and
instead uses standard kernel u32 and u64 (except in stuff that is
compiled userland where it uses uint32_t and uint64_t).

Signed-off-by: Tom Duffy <tduffy at sun.com>

Index: linux-kernel/test/dapltest/test/dapl_limit.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_limit.c	(revision 2265)
+++ linux-kernel/test/dapltest/test/dapl_limit.c	(working copy)
@@ -1049,7 +1049,7 @@ limit_test ( DT_Tdep_Print_Head *phead,
 							hdl_sets[i].lmr_buffer;
 		    iovp->segment_length  = DFLT_BUFFSZ;
 		    iovp->lmr_context	  = hdl_sets[i].lmr_context;
-		    cookie.as_64          = (DAT_UINT64)0UL;
+		    cookie.as_64          = (u64)0UL;
 		    cookie.as_ptr         = (DAT_PVOID) hdl_sets[i].lmr_buffer;
 
 		    DT_Tdep_PT_Printf (phead, "%s: dat_ep_post_recv #%d\n", module,
Index: linux-kernel/test/dapltest/test/dapl_transaction_test.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_transaction_test.c	(revision 2265)
+++ linux-kernel/test/dapltest/test/dapl_transaction_test.c	(working copy)
@@ -230,7 +230,7 @@ DT_Transaction_Main (void *param)
 {
     Transaction_Test_t  *test_ptr = (Transaction_Test_t *) param;
     DAT_RETURN          ret;
-    DAT_UINT32          i, j;
+    u32          i, j;
     bool		success = false;
     Per_Test_Data_t     *pt_ptr;
     Thread              *thread;
@@ -345,7 +345,7 @@ DT_Transaction_Main (void *param)
     for (i = 0;  i < test_ptr->cmd->eps_per_thread;  i++)
     {
 	DAT_EP_ATTR	    ep_attr;
-	DAT_UINT32	    buff_size  =  MAX_OPS * sizeof (RemoteMemoryInfo);
+	u32	    buff_size  =  MAX_OPS * sizeof (RemoteMemoryInfo);
 
 	/*
 	 * Adjust default EP attributes to fit the requested test.
@@ -517,7 +517,7 @@ DT_Transaction_Main (void *param)
 
     for (i = 0;  i < test_ptr->cmd->eps_per_thread;  i++)
     {
-	DAT_UINT32          buff_size  =  MAX_OPS * sizeof (RemoteMemoryInfo);
+	u32          buff_size  =  MAX_OPS * sizeof (RemoteMemoryInfo);
 	RemoteMemoryInfo    *RemoteMemInfo;
 	DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
 	DAT_CR_ARRIVAL_EVENT_DATA   cr_stat;
@@ -704,7 +704,7 @@ DT_Transaction_Main (void *param)
 	     * Client - connect
 	     */
 	    unsigned int retry_cnt = 0;
-	    DAT_UINT32      buff_size  =  MAX_OPS * sizeof (RemoteMemoryInfo);
+	    u32      buff_size  =  MAX_OPS * sizeof (RemoteMemoryInfo);
 
 	    DT_Tdep_PT_Debug (1,(phead,"Client[" F64x "]: Connect #%d on port 0x" F64x "\n",
 			    test_ptr->base_port, i,
Index: linux-kernel/test/dapltest/test/dapl_bpool.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_bpool.c	(revision 2265)
+++ linux-kernel/test/dapltest/test/dapl_bpool.c	(working copy)
@@ -226,7 +226,7 @@ DT_BpoolAlloc (
         iov.segment_length  = bpool_ptr->reg_size;
     	iov.lmr_context     = bpool_ptr->lmr_context;
         
-    	cookie.as_64        = (DAT_UINT64)0UL;
+    	cookie.as_64        = (u64)0UL;
     	cookie.as_ptr       = (DAT_PVOID) (uintptr_t) bpool_ptr->reg_addr;
     	mflags = (enable_rdma_write && enable_rdma_read ? DAT_MEM_PRIV_ALL_FLAG
     		    : (enable_rdma_write ?  DAT_MEM_PRIV_WRITE_FLAG
@@ -333,7 +333,7 @@ DT_Bpool_Destroy (Per_Test_Data_t * pt_p
 		iov.virtual_address = bpool_ptr->reg_addr;
 		iov.segment_length  = 0; /* un-bind */
 		iov.lmr_context     = bpool_ptr->lmr_context;
-		cookie.as_64        = (DAT_UINT64)0UL;
+		cookie.as_64        = (u64)0UL;
 		cookie.as_ptr       = (DAT_PVOID) (uintptr_t)bpool_ptr->reg_addr;
 
 		/*
Index: linux-kernel/test/dapltest/test/dapl_test_util.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_test_util.c	(revision 2265)
+++ linux-kernel/test/dapltest/test/dapl_test_util.c	(working copy)
@@ -178,7 +178,7 @@ DT_post_recv_buffer (DT_Tdep_Print_Head 
     /* iov->virtual_address = (DAT_VADDR) (uintptr_t) buff; */
     iov->segment_length  = size;
     iov->lmr_context     = lmr_c;
-    cookie.as_64         = (DAT_UINT64)0UL;
+    cookie.as_64         = (u64)0UL;
     cookie.as_ptr        = (DAT_PVOID) buff;
 
     DT_Tdep_PT_Debug (3, (phead, "Post-Recv #%d [%p, %x]\n", index, buff, size));
@@ -223,7 +223,7 @@ DT_post_send_buffer (DT_Tdep_Print_Head 
     /* iov->virtual_address = (DAT_VADDR) (uintptr_t) buff; */
     iov->segment_length  = size;
     iov->lmr_context     = lmr_c;
-    cookie.as_64         = (DAT_UINT64)0UL;
+    cookie.as_64         = (u64)0UL;
     cookie.as_ptr        = (DAT_PVOID) buff;
 
     DT_Tdep_PT_Debug (3, (phead, "Post-Send #%d [%p, %x]\n", index, buff, size));
Index: linux-kernel/test/dapltest/test/dapl_client.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_client.c	(revision 2265)
+++ linux-kernel/test/dapltest/test/dapl_client.c	(working copy)
@@ -38,7 +38,7 @@ int
 DT_cs_Client (Params_t * params_ptr,
 	  char *dapl_name,
 	  char *server_name,
-	  DAT_UINT32 total_threads)
+	  u32 total_threads)
 {
     Per_Test_Data_t     *pt_ptr             = NULL;
     DAT_IA_HANDLE       ia_handle           = DAT_HANDLE_NULL;
Index: linux-kernel/test/dapltest/test/dapl_transaction_util.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_transaction_util.c	(revision 2265)
+++ linux-kernel/test/dapltest/test/dapl_transaction_util.c	(working copy)
@@ -55,7 +55,7 @@ DT_handle_post_recv_buf (DT_Tdep_Print_H
 	    iov[j].lmr_context     = DT_Bpool_GetLMR (op->bp, j);
 	}
 	cookie.as_64  =
-	    ((((DAT_UINT64) i) << 32)
+	    ((((u64) i) << 32)
 	     | (((uintptr_t) DT_Bpool_GetBuffer (op->bp, 0)) & 0xffffffffUL));
 
 	/* Post the recv */
@@ -118,7 +118,7 @@ DT_handle_send_op (DT_Tdep_Print_Head *p
 	    iov[j].lmr_context     = DT_Bpool_GetLMR (op->bp, j);
 	}
 	cookie.as_64  =
-	    ((((DAT_UINT64) i) << 32)
+	    ((((u64) i) << 32)
 	     | (((uintptr_t) DT_Bpool_GetBuffer (op->bp, 0)) & 0xffffffffUL));
 
 	/* Post the send */
@@ -183,7 +183,7 @@ DT_handle_send_op (DT_Tdep_Print_Head *p
 	op = &ep_context[epnum].op[op_indx];
 
 	dto_cookie.as_64 =
-	    ((((DAT_UINT64) epnum) << 32)
+	    ((((u64) epnum) << 32)
 	     | (((uintptr_t) DT_Bpool_GetBuffer (op->bp, 0)) & 0xffffffffUL));
 
 	if (!DT_dto_check (phead,
@@ -293,7 +293,7 @@ DT_handle_recv_op (DT_Tdep_Print_Head *p
 
 	op = &ep_context[epnum].op[op_indx];
 	dto_cookie.as_64 =
-	    ((((DAT_UINT64) epnum) << 32)
+	    ((((u64) epnum) << 32)
 	     | (((uintptr_t) DT_Bpool_GetBuffer (op->bp, 0)) & 0xffffffffUL));
 
 	if (!DT_dto_check (phead,
@@ -368,7 +368,7 @@ DT_handle_recv_op (DT_Tdep_Print_Head *p
 	    op = &ep_context[epnum].op[op_indx - 1];
 
 	    dto_cookie.as_64 =
-		((((DAT_UINT64) epnum) << 32)
+		((((u64) epnum) << 32)
 		 | (((uintptr_t) DT_Bpool_GetBuffer (op->bp, 0))
 		    & 0xffffffffUL));
 
@@ -498,7 +498,7 @@ DT_handle_rdma_op (DT_Tdep_Print_Head *p
 	    iov[j].lmr_context     = DT_Bpool_GetLMR (op->bp, j);
 	}
 	cookie.as_64  =
-	    ((((DAT_UINT64) i) << 32)
+	    ((((u64) i) << 32)
 	     | (((uintptr_t) DT_Bpool_GetBuffer (op->bp, 0)) & 0xffffffffUL));
 
 	rmr_triplet.pad             = 0U;
@@ -583,7 +583,7 @@ DT_handle_rdma_op (DT_Tdep_Print_Head *p
 	op = &ep_context[epnum].op[op_indx];
 
 	dto_cookie.as_64 =
-	    ((((DAT_UINT64) epnum) << 32)
+	    ((((u64) epnum) << 32)
 	     | (((uintptr_t) DT_Bpool_GetBuffer (op->bp, 0)) & 0xffffffffUL));
 
 	if (!DT_dto_check (phead, 
Index: linux-kernel/test/dapltest/include/dapl_client_info.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_client_info.h	(revision 2265)
+++ linux-kernel/test/dapltest/include/dapl_client_info.h	(working copy)
@@ -34,10 +34,10 @@
 
 typedef struct
 {
-    DAT_UINT32      dapltest_version;
-    DAT_UINT32      is_little_endian;
-    DAT_UINT32      test_type;
-    DAT_UINT32      total_threads;
+    uint32_t dapltest_version;
+    uint32_t is_little_endian;
+    uint32_t test_type;
+    uint32_t total_threads;
 } Client_Info_t;
 #pragma pack ()
 
Index: linux-kernel/test/dapltest/include/dapl_performance_test.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_performance_test.h	(revision 2265)
+++ linux-kernel/test/dapltest/include/dapl_performance_test.h	(working copy)
@@ -41,11 +41,10 @@
 #define DT_PERF_DFLT_EVD_LENGTH		8
 
 
-typedef struct
-{
+typedef struct {
     DT_Transfer_Type        transfer_type;
-    DAT_UINT32              num_segs;
-    DAT_UINT32              seg_size;
+    uint32_t                num_segs;
+    uint32_t                seg_size;
     Bpool                   *bp;
 
     /* RDMA info */
Index: linux-kernel/test/dapltest/include/dapl_limit_cmd.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_limit_cmd.h	(revision 2265)
+++ linux-kernel/test/dapltest/include/dapl_limit_cmd.h	(working copy)
@@ -53,10 +53,10 @@ typedef struct
 {
     char 		device_name[256];	/* -D */
     DAT_QOS		ReliabilityLevel;	/* -R */
-    DAT_UINT32		width;			/* -w */
-    DAT_UINT32		debug;			/* -d */
-    DAT_UINT32		maximum;		/* -m */
-    DAT_UINT32 		Test_List[ LIM_NUM_TESTS ];
+    uint32_t		width;			/* -w */
+    uint32_t		debug;			/* -d */
+    uint32_t		maximum;		/* -m */
+    uint32_t 		Test_List[ LIM_NUM_TESTS ];
     DAT_MEM_TYPE 	DT_mem_type; /* -M */ 
 } Limit_Cmd_t;
 
Index: linux-kernel/test/dapltest/include/dapl_proto.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_proto.h	(revision 2265)
+++ linux-kernel/test/dapltest/include/dapl_proto.h	(working copy)
@@ -112,7 +112,7 @@ int             get_ep_connection_state 
 int             DT_cs_Client (Params_t * params_ptr,
 			      char *dapl_name,
 			      char *server_name,
-			      DAT_UINT32 total_threads);
+			      uint32_t total_threads);
 
 /* dapl_client_info.c */
 void            DT_Client_Info_Endian (Client_Info_t * client_info);
@@ -143,10 +143,10 @@ void            DT_print_transaction_sta
 
 /* dapl_endian.c */
 void            DT_Endian_Init (void);
-DAT_UINT32      DT_Endian32 (DAT_UINT32 val);
-DAT_UINT64      DT_Endian64 (DAT_UINT64 val);
-DAT_UINT32      DT_EndianMemHandle (DAT_UINT32 val);
-DAT_UINT64      DT_EndianMemAddress (DAT_UINT64 val);
+uint32_t      DT_Endian32 (uint32_t val);
+uint64_t      DT_Endian64 (uint64_t val);
+uint32_t      DT_EndianMemHandle (uint32_t val);
+uint64_t      DT_EndianMemAddress (uint64_t val);
 
 /* dapl_getopt.c */
 void            DT_mygetopt_init (mygetopt_t * opts);
Index: linux-kernel/test/dapltest/include/dapl_quit_cmd.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_quit_cmd.h	(revision 2265)
+++ linux-kernel/test/dapltest/include/dapl_quit_cmd.h	(working copy)
@@ -33,7 +33,7 @@ typedef struct
 {
     char		server_name[256];   /* -s */
     char		device_name[256];   /* -D */
-    DAT_UINT32 		debug;		    /* -d */
+    uint32_t 		debug;		    /* -d */
     DAT_QOS     	ReliabilityLevel;   /* -R */
     DAT_MEM_TYPE 	DT_mem_type; /* -M */ 
 } Quit_Cmd_t;
Index: linux-kernel/test/dapltest/include/dapl_transaction_cmd.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_transaction_cmd.h	(revision 2265)
+++ linux-kernel/test/dapltest/include/dapl_transaction_cmd.h	(working copy)
@@ -34,31 +34,29 @@
 #define NAME_SZ 256
 
 #pragma pack (2)
-typedef struct
-{
-    DAT_UINT32      server_initiated;
-    DAT_UINT32      transfer_type;
-    DAT_UINT32      num_segs;
-    DAT_UINT32      seg_size;
-    DAT_UINT32      reap_send_on_recv;
+typedef struct {
+    uint32_t server_initiated;
+    uint32_t transfer_type;
+    uint32_t num_segs;
+    uint32_t seg_size;
+    uint32_t reap_send_on_recv;
 } Transaction_Cmd_Op_t;
 
-typedef struct
-{
-    DAT_UINT32      dapltest_version;
-    DAT_UINT32      client_is_little_endian;
-    char            server_name[NAME_SZ];   /* -s */
-    DAT_UINT32      num_iterations;	/* -i */
-    DAT_UINT32      num_threads;	/* -t */
-    DAT_UINT32      eps_per_thread;	/* -w */
-    DAT_UINT32      use_cno;		/* NOT USED - remove and bump version*/
-    DAT_UINT32      use_rsp;		/* -r */
-    DAT_UINT32      debug;		/* -d */
-    DAT_UINT32      validate;		/* -V */
-    DAT_UINT32      poll;		/* -P */
+typedef struct {
+    uint32_t dapltest_version;
+    uint32_t client_is_little_endian;
+    char     server_name[NAME_SZ];   /* -s */
+    uint32_t num_iterations;	/* -i */
+    uint32_t num_threads;	/* -t */
+    uint32_t eps_per_thread;	/* -w */
+    uint32_t use_cno;		/* NOT USED - remove and bump version*/
+    uint32_t use_rsp;		/* -r */
+    uint32_t debug;		/* -d */
+    uint32_t validate;		/* -V */
+    uint32_t poll;		/* -P */
     char            dapl_name[NAME_SZ]; /* -D */
     DAT_QOS         ReliabilityLevel;
-    DAT_UINT32      num_ops;
+    uint32_t num_ops;
     Transaction_Cmd_Op_t op[MAX_OPS];
     DAT_MEM_TYPE    DT_mem_type; /* -M */
 } Transaction_Cmd_t;
Index: linux-kernel/test/dapltest/include/dapl_bpool.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_bpool.h	(revision 2265)
+++ linux-kernel/test/dapltest/include/dapl_bpool.h	(working copy)
@@ -38,7 +38,7 @@ typedef struct Bpool_tag Bpool;
 struct Bpool_tag
 {
     unsigned char  *alloc_ptr;
-    DAT_UINT32      alloc_size;
+    uint32_t        alloc_size;
     DAT_PZ_HANDLE   pz_handle;
     DAT_COUNT       seg_size;
     DAT_COUNT       num_segs;		/* num segments */
Index: linux-kernel/test/dapltest/include/dapl_server_info.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_server_info.h	(revision 2265)
+++ linux-kernel/test/dapltest/include/dapl_server_info.h	(working copy)
@@ -44,11 +44,10 @@ extern Started_server_t *DT_started_serv
 
 #define SERVER_PORT_NUMBER ((DAT_CONN_QUAL)0xB0de)
 
-typedef struct
-{
-    DAT_UINT32      dapltest_version;
-    DAT_UINT32      is_little_endian;
-    DAT_UINT32      first_port_number;
+typedef struct {
+    uint32_t      dapltest_version;
+    uint32_t      is_little_endian;
+    uint32_t      first_port_number;
 } Server_Info_t;
 #pragma pack ()
 
Index: linux-kernel/test/dapltest/include/dapl_performance_cmd.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_performance_cmd.h	(revision 2265)
+++ linux-kernel/test/dapltest/include/dapl_performance_cmd.h	(working copy)
@@ -39,26 +39,24 @@ typedef enum
 } Performance_Mode_Type;
 
 #pragma pack (2)
-typedef struct
-{
-    DAT_UINT32      transfer_type;
-    DAT_UINT32      seg_size;
-    DAT_UINT32      num_segs;
+typedef struct {
+    uint32_t transfer_type;
+    uint32_t seg_size;
+    uint32_t num_segs;
 } Performance_Cmd_Op_t;
 
-typedef struct
-{
-    DAT_UINT32      		dapltest_version;
-    DAT_UINT32      		client_is_little_endian;
+typedef struct {
+    uint32_t	 		dapltest_version;
+    uint32_t   			client_is_little_endian;
     char            		server_name[NAME_SZ];	/* -s */
     char            		dapl_name[NAME_SZ];	/* -D */
     DAT_QOS         		qos;
-    DAT_UINT32      		debug;			/* -d */
+    uint32_t   			debug;			/* -d */
     Performance_Mode_Type	mode;			/* -m */
-    DAT_UINT32      		num_iterations;		/* -i */
-    DAT_UINT32      		pipeline_len;		/* -p */
+    uint32_t      		num_iterations;		/* -i */
+    uint32_t      		pipeline_len;		/* -p */
     Performance_Cmd_Op_t 	op;
-    DAT_UINT32      		use_rsp;		/* -r */
+    uint32_t      		use_rsp;		/* -r */
     DAT_MEM_TYPE 		DT_mem_type; /* -M */ 
 } Performance_Cmd_t;
 #pragma pack ()
Index: linux-kernel/test/dapltest/include/dapl_transaction_test.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_transaction_test.h	(revision 2265)
+++ linux-kernel/test/dapltest/include/dapl_transaction_test.h	(working copy)
@@ -37,8 +37,8 @@ typedef struct
 {
     DAT_BOOLEAN             server_initiated;
     DT_Transfer_Type        transfer_type;
-    DAT_UINT32              num_segs;
-    DAT_UINT32              seg_size;
+    uint32_t                num_segs;
+    uint32_t                seg_size;
     DAT_BOOLEAN             reap_send_on_recv;
     Bpool                   *bp;
 
Index: linux-kernel/test/dapltest/mdep/linux/dapl_mdep_user.c
===================================================================
--- linux-kernel/test/dapltest/mdep/linux/dapl_mdep_user.c	(revision 2265)
+++ linux-kernel/test/dapltest/mdep/linux/dapl_mdep_user.c	(working copy)
@@ -175,7 +175,7 @@ DT_Mdep_GetTime (void)
 {
     struct tms      ts;
     clock_t         t = times (&ts);
-    return (unsigned long) ((DAT_UINT64) t * 1000 / CLK_TCK);
+    return (unsigned long) ((uint64_t) t * 1000 / CLK_TCK);
 }
 
 double
Index: linux-kernel/test/dapltest/common/dapl_endian.c
===================================================================
--- linux-kernel/test/dapltest/common/dapl_endian.c	(revision 2265)
+++ linux-kernel/test/dapltest/common/dapl_endian.c	(working copy)
@@ -39,21 +39,21 @@ DT_Endian_Init (void)
  * Big/Little Endian conversion functions
  */
 
-#define c1a32 ((DAT_UINT32)0x00FF00FF)
-#define c1b32 ((DAT_UINT32)0xFF00FF00)
-#define c2a32 ((DAT_UINT32)0x0000FFFF)
-#define c2b32 ((DAT_UINT32)0xFFFF0000)
-#define c164 ((DAT_UINT64)0x00FF00FF)
+#define c1a32 ((uint32_t)0x00FF00FF)
+#define c1b32 ((uint32_t)0xFF00FF00)
+#define c2a32 ((uint32_t)0x0000FFFF)
+#define c2b32 ((uint32_t)0xFFFF0000)
+#define c164 ((uint64_t)0x00FF00FF)
 #define c1a64 (c164 | (c164 << 32))
 #define c1b64 (c1a64 << 8)
-#define c264 ((DAT_UINT64)0x0000FFFF)
+#define c264 ((uint64_t)0x0000FFFF)
 #define c2a64 (c264 | (c264 << 32))
 #define c2b64 (c2a64 << 16)
-#define c3a64 ((DAT_UINT64)0xFFFFFFFF)
+#define c3a64 ((uint64_t)0xFFFFFFFF)
 #define c3b64 (c3a64 << 32)
 
-DAT_UINT32
-DT_Endian32 (DAT_UINT32 val)
+uint32_t
+DT_Endian32 (uint32_t val)
 {
     if (DT_local_is_little_endian)
     {
@@ -64,8 +64,8 @@ DT_Endian32 (DAT_UINT32 val)
     return (val);
 }
 
-DAT_UINT64
-DT_Endian64 (DAT_UINT64 val)
+uint64_t
+DT_Endian64 (uint64_t val)
 {
     if (DT_local_is_little_endian)
     {
@@ -77,18 +77,18 @@ DT_Endian64 (DAT_UINT64 val)
     return (val);
 }
 
-DAT_UINT32
-DT_EndianMemHandle (DAT_UINT32 val)
+uint32_t
+DT_EndianMemHandle (uint32_t val)
 {
     val = ((val & c1a32) << 8) | ((val & c1b32) >> 8);
     val = ((val & c2a32) << 16) | ((val & c2b32) >> 16);
     return (val);
 }
 
-DAT_UINT64
-DT_EndianMemAddress (DAT_UINT64 val)
+uint64_t
+DT_EndianMemAddress (uint64_t val)
 {
-    DAT_UINT64      val64;
+    uint64_t      val64;
     val64 = val;
     val64 = ((val64 & c1a64) << 8) | ((val64 & c1b64) >> 8);
     val64 = ((val64 & c2a64) << 16) | ((val64 & c2b64) >> 16);
Index: linux-kernel/dat-provider/dapl_adapter_util.h
===================================================================
--- linux-kernel/dat-provider/dapl_adapter_util.h	(revision 2265)
+++ linux-kernel/dat-provider/dapl_adapter_util.h	(working copy)
@@ -79,7 +79,7 @@ DAT_RETURN dapl_ib_connect(DAT_EP_HANDLE
 DAT_RETURN dapl_ib_disconnect(DAPL_EP * ep_ptr, DAT_CLOSE_FLAGS close_flags);
 
 DAT_RETURN dapl_ib_setup_conn_listener(DAPL_IA * ia_ptr,
-				       DAT_UINT64 ServiceID, DAPL_SP * sp_ptr);
+				       u64 ServiceID, DAPL_SP * sp_ptr);
 
 DAT_RETURN dapl_ib_remove_conn_listener(DAPL_IA * ia_ptr, DAPL_SP * sp_ptr);
 
Index: linux-kernel/dat-provider/dapl_openib_cm.c
===================================================================
--- linux-kernel/dat-provider/dapl_openib_cm.c	(revision 2265)
+++ linux-kernel/dat-provider/dapl_openib_cm.c	(working copy)
@@ -598,7 +598,7 @@ void dapl_ib_reinit_ep(DAPL_EP * ep_ptr)
  */
 DAT_RETURN
 dapl_ib_setup_conn_listener(DAPL_IA * ia_ptr,
-			    DAT_UINT64 ServiceID, DAPL_SP * sp_ptr)
+			    u64 ServiceID, DAPL_SP * sp_ptr)
 {
 	int status;
 
Index: linux-kernel/dat-provider/dapl_util.c
===================================================================
--- linux-kernel/dat-provider/dapl_util.c	(revision 2265)
+++ linux-kernel/dat-provider/dapl_util.c	(working copy)
@@ -60,7 +60,7 @@ DAT_RETURN dapl_os_get_time(DAPL_OS_TIME
 	struct timeval tv;
 
 	do_gettimeofday(&tv);
-	*loc = ((DAT_UINT64) (tv.tv_sec) * 1000000L) + (DAT_UINT64) tv.tv_usec;
+	*loc = ((u64) (tv.tv_sec) * 1000000L) + (u64) tv.tv_usec;
 
 	return DAT_SUCCESS;
 }
Index: linux-kernel/dat-provider/dapl_util.h
===================================================================
--- linux-kernel/dat-provider/dapl_util.h	(revision 2265)
+++ linux-kernel/dat-provider/dapl_util.h	(working copy)
@@ -188,7 +188,7 @@ static __inline__ char *dapl_os_strdup(c
  * Timer Functions
  */
 
-typedef DAT_UINT64 DAPL_OS_TIMEVAL;
+typedef u64 DAPL_OS_TIMEVAL;
 typedef struct dapl_timer_entry DAPL_OS_TIMER;
 typedef unsigned long long int DAPL_OS_TICKS;
 
Index: linux-kernel/dat-provider/dapl.h
===================================================================
--- linux-kernel/dat-provider/dapl.h	(revision 2265)
+++ linux-kernel/dat-provider/dapl.h	(working copy)
@@ -156,7 +156,7 @@ typedef struct dapl_cookie_buffer DAPL_C
 
 typedef struct dapl_hash_table DAPL_HASH_TABLE;
 typedef struct dapl_hash_table *DAPL_HASH_TABLEP;
-typedef DAT_UINT64 DAPL_HASH_KEY;
+typedef u64 DAPL_HASH_KEY;
 typedef void *DAPL_HASH_DATA;
 
 typedef struct dapl_hca DAPL_HCA;
Index: linux-kernel/dat/consumer.c
===================================================================
--- linux-kernel/dat/consumer.c	(revision 2265)
+++ linux-kernel/dat/consumer.c	(working copy)
@@ -579,7 +579,7 @@ dat_ia_openv(const DAT_NAME_PTR name,
 	     DAT_COUNT async_event_qlen,
 	     DAT_EVD_HANDLE * async_event_handle,
 	     DAT_IA_HANDLE * ia_handle,
-	     DAT_UINT32 dat_major, DAT_UINT32 dat_minor,
+	     u32 dat_major, u32 dat_minor,
 	     DAT_BOOLEAN thread_safety)
 {
 	DAT_IA_OPEN_FUNC ia_open_func;
Index: linux-kernel/dat/dat.h
===================================================================
--- linux-kernel/dat/dat.h	(revision 2265)
+++ linux-kernel/dat/dat.h	(working copy)
@@ -37,18 +37,12 @@
 #define DAT_VERSION_MINOR 2
 #define DAT_THREADSAFE DAT_FALSE
 
-/* unsigned host order, 32 bits */
-typedef u_int32_t DAT_UINT32;
-
-/* unsigned host order, 64 bits */
-typedef u_int64_t DAT_UINT64;
-
 /* unsigned longest native to compiler */
 typedef unsigned long long DAT_UVERYLONG;
 
 typedef void * DAT_PVOID;
 typedef int DAT_COUNT;
-typedef DAT_UINT64 DAT_PADDR;
+typedef u64 DAT_PADDR;
 typedef struct sockaddr DAT_SOCK_ADDR;      
 typedef struct sockaddr_in6 DAT_SOCK_ADDR6;
 
@@ -65,7 +59,7 @@ typedef struct sockaddr_in6 DAT_SOCK_ADD
  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  */
 
-typedef DAT_UINT32 DAT_RETURN;
+typedef u32 DAT_RETURN;
 
 typedef enum dat_return_class {
 	DAT_CLASS_ERROR = 0x80000000,
@@ -341,14 +335,14 @@ typedef enum dat_return_subtype {
  * Determining the success of an operation is best done with a macro;
  * each of these returns a boolean value.
  */
-#define DAT_IS_ERROR(status)  ((DAT_UINT32)(status) & DAT_CLASS_ERROR)
-#define DAT_IS_WARNING(status)  ((DAT_UINT32)(status) & DAT_CLASS_WARNING)
+#define DAT_IS_ERROR(status)  ((u32)(status) & DAT_CLASS_ERROR)
+#define DAT_IS_WARNING(status)  ((u32)(status) & DAT_CLASS_WARNING)
 
 #define DAT_ERROR(Type, SubType) ((DAT_RETURN)(DAT_CLASS_ERROR | Type | SubType))
 #define DAT_WARNING(Type, SubType) ((DAT_RETURN)(DAT_CLASS_WARNING | Type | SubType))
 
-#define DAT_GET_TYPE(status)    ((DAT_UINT32)(status) & DAT_TYPE_MASK)
-#define DAT_GET_SUBTYPE(status) ((DAT_UINT32)(status) & DAT_SUBTYPE_MASK)
+#define DAT_GET_TYPE(status)    ((u32)(status) & DAT_TYPE_MASK)
+#define DAT_GET_SUBTYPE(status) ((u32)(status) & DAT_SUBTYPE_MASK)
 
 /* dat handle types */
 typedef enum dat_handle_type {
@@ -379,7 +373,7 @@ typedef enum dat_boolean {
 
 typedef union dat_context {
 	DAT_PVOID as_ptr;
-	DAT_UINT64 as_64;
+	u64 as_64;
 	DAT_UVERYLONG as_index;
 } DAT_CONTEXT;
 
@@ -404,7 +398,7 @@ typedef enum dat_completion_flags {
 	DAT_COMPLETION_EVD_THRESHOLD_FLAG = 0x10
 } DAT_COMPLETION_FLAGS;
 
-typedef DAT_UINT32 DAT_TIMEOUT;	/* microseconds */
+typedef u32 DAT_TIMEOUT;	/* microseconds */
 
 /* timeout = infinity */
 #define DAT_TIMEOUT_INFINITE    ((DAT_TIMEOUT) ~0)
@@ -426,8 +420,8 @@ typedef DAT_HANDLE DAT_SRQ_HANDLE;
 
 typedef DAT_SOCK_ADDR *DAT_IA_ADDRESS_PTR;
 
-typedef DAT_UINT64 DAT_CONN_QUAL;
-typedef DAT_UINT64 DAT_PORT_QUAL;
+typedef u64 DAT_CONN_QUAL;
+typedef u64 DAT_PORT_QUAL;
 
 /* QOS definitions */
 typedef enum dat_qos {
@@ -518,11 +512,11 @@ typedef enum dat_psp_flags {
  * For the best performance, Consumers should align each buffer segment to
  * the boundary specified by the dat_optimal_alignment.
  */
-typedef DAT_UINT32 DAT_LMR_CONTEXT;
-typedef DAT_UINT32 DAT_RMR_CONTEXT;
+typedef u32 DAT_LMR_CONTEXT;
+typedef u32 DAT_RMR_CONTEXT;
 
-typedef DAT_UINT64 DAT_VLEN;
-typedef DAT_UINT64 DAT_VADDR;
+typedef u64 DAT_VLEN;
+typedef u64 DAT_VADDR;
 
 /* It is legal for the Consumer to specify zero for segment_length
  * of the dat_lmr_triplet. When 0 is specified for the
@@ -532,14 +526,14 @@ typedef DAT_UINT64 DAT_VADDR;
 
 typedef struct dat_lmr_triplet {
 	DAT_LMR_CONTEXT lmr_context;
-	DAT_UINT32 pad; /* align structure on 64-bit boundry */
+	u32 pad; /* align structure on 64-bit boundry */
 	DAT_VADDR virtual_address;
 	DAT_VLEN segment_length;
 } DAT_LMR_TRIPLET;
 
 typedef struct dat_rmr_triplet {
 	DAT_RMR_CONTEXT rmr_context;
-	DAT_UINT32 pad; /* align structure on 64-bit boundry */
+	u32 pad; /* align structure on 64-bit boundry */
 	DAT_VADDR target_address;
 	DAT_VLEN segment_length;
 } DAT_RMR_TRIPLET;
@@ -955,8 +949,8 @@ typedef struct dat_upcall_object {
 
 typedef struct dat_provider_info {
 	char ia_name[DAT_NAME_MAX_LENGTH];
-	DAT_UINT32 dat_version_major;
-	DAT_UINT32 dat_version_minor;
+	u32 dat_version_major;
+	u32 dat_version_minor;
 	DAT_BOOLEAN is_thread_safe;
 } DAT_PROVIDER_INFO;
 
@@ -1013,10 +1007,10 @@ typedef struct dat_lmr_param {
 typedef struct dat_ia_attr {
 	char adapter_name[DAT_NAME_MAX_LENGTH];
 	char vendor_name[DAT_NAME_MAX_LENGTH];
-	DAT_UINT32 hardware_version_major;
-	DAT_UINT32 hardware_version_minor;
-	DAT_UINT32 firmware_version_major;
-	DAT_UINT32 firmware_version_minor;
+	u32 hardware_version_major;
+	u32 hardware_version_minor;
+	u32 firmware_version_major;
+	u32 firmware_version_minor;
 	DAT_IA_ADDRESS_PTR ia_address_ptr;
 	DAT_COUNT max_eps;
 	DAT_COUNT max_dto_per_ep;
@@ -1078,10 +1072,10 @@ typedef enum dat_ep_creator_for_psp {
 
 typedef struct dat_provider_attr {
 	char provider_name[DAT_NAME_MAX_LENGTH];
-	DAT_UINT32 provider_version_major;
-	DAT_UINT32 provider_version_minor;
-	DAT_UINT32 dat_version_major;
-	DAT_UINT32 dat_version_minor;
+	u32 provider_version_major;
+	u32 provider_version_minor;
+	u32 dat_version_major;
+	u32 dat_version_minor;
 	DAT_MEM_TYPE lmr_mem_types_supported;
 	DAT_IOV_OWNERSHIP iov_ownership_on_return;
 	DAT_QOS dat_qos_supported;
@@ -1091,7 +1085,7 @@ typedef struct dat_provider_attr {
 	DAT_BOOLEAN supports_multipath;
 	DAT_EP_CREATOR_FOR_PSP ep_creator;
 	DAT_UPCALL_POLICY upcall_policy;
-	DAT_UINT32 optimal_buffer_alignment;
+	u32 optimal_buffer_alignment;
 	const DAT_BOOLEAN evd_stream_merging_supported[6][6];
 	DAT_BOOLEAN srq_supported;
 	DAT_COUNT srq_watermarks_supported;
@@ -1117,7 +1111,7 @@ typedef DAT_RETURN (*DAT_IA_OPEN_FUNC) (
 
 typedef DAT_RETURN (*DAT_IA_OPENV_FUNC) (
         const DAT_NAME_PTR, DAT_COUNT, DAT_EVD_HANDLE *, DAT_IA_HANDLE *,
-        DAT_UINT32, DAT_UINT32,	DAT_BOOLEAN);
+        u32, u32,	DAT_BOOLEAN);
 
 typedef DAT_RETURN (*DAT_IA_CLOSE_FUNC) (DAT_IA_HANDLE, DAT_CLOSE_FLAGS);
 
@@ -1380,7 +1374,7 @@ extern DAT_RETURN dat_registry_remove_pr
  */
 extern DAT_RETURN dat_ia_openv(const DAT_NAME_PTR, DAT_COUNT, 
                                DAT_EVD_HANDLE *, DAT_IA_HANDLE *, 
-                               DAT_UINT32, DAT_UINT32, DAT_BOOLEAN);
+                               u32, u32, DAT_BOOLEAN);
 
 #define dat_ia_open(name, qlen, async_evd, ia) \
         dat_ia_openv((name), (qlen), (async_evd), (ia), \




More information about the general mailing list