[openib-general] [PATCH][9/19] kDAPL: Remove typedef DAT_MEM_TYPE

Tom Duffy Tom.Duffy at Sun.COM
Sun May 15 11:27:17 PDT 2005


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

diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/dat/dat.h linux-kernel9/dat/dat.h
--- linux-kernel8/dat/dat.h	2005-05-13 14:08:19.213960000 -0700
+++ linux-kernel9/dat/dat.h	2005-05-13 14:18:22.224001000 -0700
@@ -523,14 +523,14 @@ struct dat_rmr_triplet {
 	u64 segment_length;
 };
 
-typedef enum dat_mem_type {
+enum dat_mem_type {
 	DAT_MEM_TYPE_VIRTUAL = 0x00,
 	DAT_MEM_TYPE_LMR = 0x01,
 	DAT_MEM_TYPE_PHYSICAL = 0x10,
 	DAT_MEM_TYPE_PLATFORM = 0x20,
 	DAT_MEM_TYPE_IA = 0x40,
 	DAT_MEM_TYPE_BYPASS = 0x80
-} DAT_MEM_TYPE;
+};
 
 /* Memory privileges */
 typedef enum dat_mem_priv_flags {
@@ -978,7 +978,7 @@ typedef union dat_region_description {
 /* LMR Arguments */
 struct dat_lmr_param {
 	DAT_IA_HANDLE ia_handle;
-	DAT_MEM_TYPE mem_type;
+	enum dat_mem_type mem_type;
 	DAT_REGION_DESCRIPTION region_desc;
 	u64 length;
 	DAT_PZ_HANDLE pz_handle;
@@ -1062,7 +1062,7 @@ struct dat_provider_attr {
 	u32 provider_version_minor;
 	u32 dat_version_major;
 	u32 dat_version_minor;
-	DAT_MEM_TYPE lmr_mem_types_supported;
+	enum dat_mem_type lmr_mem_types_supported;
 	DAT_IOV_OWNERSHIP iov_ownership_on_return;
 	enum dat_qos dat_qos_supported;
 	enum dat_completion_flags completion_flags_supported;
@@ -1247,14 +1247,14 @@ typedef u32 (*DAT_SRQ_RESIZE_FUNC)(DAT_S
 typedef u32 (*DAT_SRQ_POST_RECV_FUNC)(DAT_SRQ_HANDLE, int,
 				      struct dat_lmr_triplet *, DAT_DTO_COOKIE);
 
-typedef u32 (*DAT_LMR_KCREATE_FUNC)(DAT_IA_HANDLE, DAT_MEM_TYPE,
+typedef u32 (*DAT_LMR_KCREATE_FUNC)(DAT_IA_HANDLE, enum dat_mem_type,
 				    DAT_REGION_DESCRIPTION, u64,
 				    DAT_PZ_HANDLE, DAT_MEM_PRIV_FLAGS,
 				    DAT_MEM_OPTIMIZE_FLAGS, DAT_LMR_HANDLE *,
 				    DAT_LMR_CONTEXT *, DAT_RMR_CONTEXT *,
 				    u64 *, u64 *);
 
-typedef u32 (*DAT_IA_MEMTYPE_HINT_FUNC)(DAT_IA_HANDLE, DAT_MEM_TYPE, u64,
+typedef u32 (*DAT_IA_MEMTYPE_HINT_FUNC)(DAT_IA_HANDLE, enum dat_mem_type, u64,
 					DAT_MEM_OPTIMIZE_FLAGS, u64 *,
 					u64 *);
 
@@ -1410,7 +1410,8 @@ static inline u32 dat_get_handle_type(DA
         return DAT_CALL_PROVIDER_FUNC(get_handle_type_func, handle, type);
 }
 
-static inline u32 dat_ia_memtype_hint(DAT_IA_HANDLE ia, DAT_MEM_TYPE mem_type,
+static inline u32 dat_ia_memtype_hint(DAT_IA_HANDLE ia,
+				      enum dat_mem_type mem_type,
 				      u64 length,
 				      DAT_MEM_OPTIMIZE_FLAGS mem_optimize,
 				      u64 *preferred_length,
@@ -1772,7 +1773,7 @@ static inline u32 dat_srq_set_lw(DAT_SRQ
         return DAT_CALL_PROVIDER_FUNC(srq_set_lw_func, srq, low_watermark);
 }
 
-static inline u32 dat_lmr_kcreate(DAT_IA_HANDLE ia, DAT_MEM_TYPE type,
+static inline u32 dat_lmr_kcreate(DAT_IA_HANDLE ia, enum dat_mem_type type,
 				  DAT_REGION_DESCRIPTION region, u64 len,
 				  DAT_PZ_HANDLE pz,
 				  DAT_MEM_PRIV_FLAGS privileges,
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/dat-provider/dapl.h linux-kernel9/dat-provider/dapl.h
--- linux-kernel8/dat-provider/dapl.h	2005-05-13 14:09:01.172975000 -0700
+++ linux-kernel9/dat-provider/dapl.h	2005-05-13 14:18:52.134000000 -0700
@@ -505,7 +505,8 @@ extern u32 dapl_cr_reject(DAT_CR_HANDLE 
 extern u32 dapl_cr_handoff(DAT_CR_HANDLE cr_handle, DAT_CONN_QUAL handoff);
 
 /* EVD Functions */
-extern u32 dapl_ia_memtype_hint(DAT_IA_HANDLE ia_handle, DAT_MEM_TYPE mem_type,
+extern u32 dapl_ia_memtype_hint(DAT_IA_HANDLE ia_handle,
+				enum dat_mem_type mem_type,
 				u64 length, DAT_MEM_OPT mem_optimization,
 				u64 *suggested_length,
 				u64 *suggested_alignment);
@@ -623,7 +624,7 @@ extern u32 dapl_ep_set_watermark(DAT_EP_
 
 /* LMR functions */
 
-extern u32 dapl_lmr_kcreate(DAT_IA_HANDLE ia_handle, DAT_MEM_TYPE mem_type,
+extern u32 dapl_lmr_kcreate(DAT_IA_HANDLE ia_handle, enum dat_mem_type mem_type,
 			    DAT_REGION_DESCRIPTION region_description,
 			    u64 length, DAT_PZ_HANDLE pz_handle,
 			    DAT_MEM_PRIV_FLAGS privileges,
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/dat-provider/dapl_ia_memtype_hint.c linux-kernel9/dat-provider/dapl_ia_memtype_hint.c
--- linux-kernel8/dat-provider/dapl_ia_memtype_hint.c	2005-05-13 11:38:08.145005000 -0700
+++ linux-kernel9/dat-provider/dapl_ia_memtype_hint.c	2005-05-13 14:14:08.086967000 -0700
@@ -63,7 +63,7 @@
  * 	DAT_INVALID_HANDLE
  * 	DAT_MODEL_NOT_SUPPORTED
  */
-u32 dapl_ia_memtype_hint(DAT_IA_HANDLE ia_handle, DAT_MEM_TYPE mem_type,
+u32 dapl_ia_memtype_hint(DAT_IA_HANDLE ia_handle, enum dat_mem_type mem_type,
 			 u64 length, DAT_MEM_OPT mem_optimization,
 			 u64 *suggested_length,
 			 u64 *suggested_alignment)
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/dat-provider/dapl_lmr_kcreate.c linux-kernel9/dat-provider/dapl_lmr_kcreate.c
--- linux-kernel8/dat-provider/dapl_lmr_kcreate.c	2005-05-13 12:25:34.349006000 -0700
+++ linux-kernel9/dat-provider/dapl_lmr_kcreate.c	2005-05-13 14:14:08.090970000 -0700
@@ -301,7 +301,7 @@ bail:
  * 	DAT_MODEL_NOT_SUPPORTED
  *
  */
-u32 dapl_lmr_kcreate(DAT_IA_HANDLE ia_handle, DAT_MEM_TYPE mem_type,
+u32 dapl_lmr_kcreate(DAT_IA_HANDLE ia_handle, enum dat_mem_type mem_type,
 		     DAT_REGION_DESCRIPTION region_description, u64 length,
 		     DAT_PZ_HANDLE pz_handle, DAT_MEM_PRIV_FLAGS privileges,
 		     DAT_MEM_OPT optimization, DAT_LMR_HANDLE *lmr_handle,
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/dat-provider/dapl_lmr_util.c linux-kernel9/dat-provider/dapl_lmr_util.c
--- linux-kernel8/dat-provider/dapl_lmr_util.c	2005-05-13 11:38:08.157005000 -0700
+++ linux-kernel9/dat-provider/dapl_lmr_util.c	2005-05-13 14:14:08.094964000 -0700
@@ -39,7 +39,7 @@
 #include "dapl_ia_util.h"
 
 DAPL_LMR *dapl_lmr_alloc(DAPL_IA * ia,
-			 DAT_MEM_TYPE mem_type,
+			 enum dat_mem_type mem_type,
 			 DAT_REGION_DESCRIPTION region_desc,
 			 u64 length,
 			 DAT_PZ_HANDLE pz_handle, DAT_MEM_PRIV_FLAGS mem_priv)
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/dat-provider/dapl_lmr_util.h linux-kernel9/dat-provider/dapl_lmr_util.h
--- linux-kernel8/dat-provider/dapl_lmr_util.h	2005-05-13 11:38:08.160008000 -0700
+++ linux-kernel9/dat-provider/dapl_lmr_util.h	2005-05-13 14:14:08.096974000 -0700
@@ -46,7 +46,7 @@
  *********************************************************************/
 
 extern DAPL_LMR *dapl_lmr_alloc(DAPL_IA * ia,
-				DAT_MEM_TYPE mem_type,
+				enum dat_mem_type mem_type,
 				DAT_REGION_DESCRIPTION region_desc,
 				u64 length,
 				DAT_PZ_HANDLE pz_handle,
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/dat-provider/dapl_mr_util.c linux-kernel9/dat-provider/dapl_mr_util.c
--- linux-kernel8/dat-provider/dapl_mr_util.c	2005-05-13 12:17:35.132016000 -0700
+++ linux-kernel9/dat-provider/dapl_mr_util.c	2005-05-13 14:14:08.099977000 -0700
@@ -56,7 +56,7 @@
  *
  */
 
-u64 dapl_mr_get_address(DAT_REGION_DESCRIPTION desc, DAT_MEM_TYPE type)
+u64 dapl_mr_get_address(DAT_REGION_DESCRIPTION desc, enum dat_mem_type type)
 {
 	DAPL_LMR *lmr;
 
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/dat-provider/dapl_mr_util.h linux-kernel9/dat-provider/dapl_mr_util.h
--- linux-kernel8/dat-provider/dapl_mr_util.h	2005-05-13 12:14:14.433011000 -0700
+++ linux-kernel9/dat-provider/dapl_mr_util.h	2005-05-13 14:19:32.745005000 -0700
@@ -40,7 +40,8 @@
 #include "dapl.h"
 #include "dapl_hash.h"
 
-extern u64 dapl_mr_get_address(DAT_REGION_DESCRIPTION desc, DAT_MEM_TYPE type);
+extern u64 dapl_mr_get_address(DAT_REGION_DESCRIPTION desc,
+			       enum dat_mem_type type);
 
 /*
  * dapl_mr_bounds_check
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/test/dapltest/cmd/dapl_params.c linux-kernel9/test/dapltest/cmd/dapl_params.c
--- linux-kernel8/test/dapltest/cmd/dapl_params.c	2005-05-11 08:59:09.017003000 -0700
+++ linux-kernel9/test/dapltest/cmd/dapl_params.c	2005-05-13 14:15:17.481996000 -0700
@@ -308,7 +308,7 @@ error_return:
     return FALSE;
 }
 
-DAT_MEM_TYPE
+enum dat_mem_type
 DT_ParseMemType (char *arg)
 {
     if (0 == strcmp (arg, "PHY"))
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/test/dapltest/include/dapl_fft_cmd.h linux-kernel9/test/dapltest/include/dapl_fft_cmd.h
--- linux-kernel8/test/dapltest/include/dapl_fft_cmd.h	2005-05-13 12:36:28.910012000 -0700
+++ linux-kernel9/test/dapltest/include/dapl_fft_cmd.h	2005-05-13 14:14:08.115963000 -0700
@@ -64,7 +64,7 @@ typedef struct
     int 		num_threads;	/* -t */
     int 		num_vis;	/* -v */
     enum dat_qos	ReliabilityLevel; /* -R */
-    DAT_MEM_TYPE 	DT_mem_type; /* -M */ 
+    enum dat_mem_type 	DT_mem_type; /* -M */ 
 } FFT_Cmd_t;
 
 #endif
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/test/dapltest/include/dapl_limit_cmd.h linux-kernel9/test/dapltest/include/dapl_limit_cmd.h
--- linux-kernel8/test/dapltest/include/dapl_limit_cmd.h	2005-05-13 12:36:53.685003000 -0700
+++ linux-kernel9/test/dapltest/include/dapl_limit_cmd.h	2005-05-13 14:14:08.118966000 -0700
@@ -57,7 +57,7 @@ typedef struct
     uint32_t		debug;			/* -d */
     uint32_t		maximum;		/* -m */
     uint32_t 		Test_List[ LIM_NUM_TESTS ];
-    DAT_MEM_TYPE 	DT_mem_type; /* -M */ 
+    enum dat_mem_type 	DT_mem_type; /* -M */ 
 } Limit_Cmd_t;
 
 #pragma pack ()
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/test/dapltest/include/dapl_params.h linux-kernel9/test/dapltest/include/dapl_params.h
--- linux-kernel8/test/dapltest/include/dapl_params.h	2005-05-13 12:33:26.960013000 -0700
+++ linux-kernel9/test/dapltest/include/dapl_params.h	2005-05-13 14:14:08.120970000 -0700
@@ -66,7 +66,7 @@ typedef struct
     void *	    phead;
     boolean_t     local_is_little_endian;
     boolean_t     debug;
-    DAT_MEM_TYPE    mem_type;
+    enum dat_mem_type    mem_type;
     Transaction_Stats2_t Client_Stats_T;
     Performance_Stats_t Client_Stats_P;
 } Params_t;
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/test/dapltest/include/dapl_performance_cmd.h linux-kernel9/test/dapltest/include/dapl_performance_cmd.h
--- linux-kernel8/test/dapltest/include/dapl_performance_cmd.h	2005-05-13 12:37:40.908007000 -0700
+++ linux-kernel9/test/dapltest/include/dapl_performance_cmd.h	2005-05-13 14:14:08.122977000 -0700
@@ -57,7 +57,7 @@ typedef struct {
     uint32_t      		pipeline_len;		/* -p */
     Performance_Cmd_Op_t 	op;
     uint32_t      		use_rsp;		/* -r */
-    DAT_MEM_TYPE 		DT_mem_type; /* -M */ 
+    enum dat_mem_type 		DT_mem_type; /* -M */ 
 } Performance_Cmd_t;
 #pragma pack ()
 
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/test/dapltest/include/dapl_proto.h linux-kernel9/test/dapltest/include/dapl_proto.h
--- linux-kernel8/test/dapltest/include/dapl_proto.h	2005-05-13 12:38:11.981004000 -0700
+++ linux-kernel9/test/dapltest/include/dapl_proto.h	2005-05-13 14:14:08.128967000 -0700
@@ -535,7 +535,7 @@ const char      *DT_State2Str (DAT_EP_ST
 
 enum dat_qos    DT_ParseQoS (char *arg);
 
-DAT_MEM_TYPE    DT_ParseMemType (char *arg);
+enum dat_mem_type    DT_ParseMemType (char *arg);
 
 unsigned char   *DT_AlignPtr (void * val, int align);
 
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/test/dapltest/include/dapl_quit_cmd.h linux-kernel9/test/dapltest/include/dapl_quit_cmd.h
--- linux-kernel8/test/dapltest/include/dapl_quit_cmd.h	2005-05-13 12:33:26.970006000 -0700
+++ linux-kernel9/test/dapltest/include/dapl_quit_cmd.h	2005-05-13 14:14:08.130971000 -0700
@@ -35,7 +35,7 @@ typedef struct
     char		device_name[256];   /* -D */
     uint32_t 		debug;		    /* -d */
     enum dat_qos     	ReliabilityLevel;   /* -R */
-    DAT_MEM_TYPE 	DT_mem_type; /* -M */ 
+    enum dat_mem_type 	DT_mem_type; /* -M */ 
 } Quit_Cmd_t;
 #pragma pack ()
 
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/test/dapltest/include/dapl_server_cmd.h linux-kernel9/test/dapltest/include/dapl_server_cmd.h
--- linux-kernel8/test/dapltest/include/dapl_server_cmd.h	2005-05-13 12:38:35.892014000 -0700
+++ linux-kernel9/test/dapltest/include/dapl_server_cmd.h	2005-05-13 14:14:08.133963000 -0700
@@ -35,7 +35,7 @@ typedef struct
     boolean_t       debug;		/* -d */
     char            dapl_name[256];	/* -D device name */
     enum dat_qos    ReliabilityLevel;	/* -R */
-    DAT_MEM_TYPE    DT_mem_type; /* -M */ 
+    enum dat_mem_type    DT_mem_type; /* -M */ 
 } Server_Cmd_t;
 #pragma pack ()
 
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/test/dapltest/include/dapl_transaction_cmd.h linux-kernel9/test/dapltest/include/dapl_transaction_cmd.h
--- linux-kernel8/test/dapltest/include/dapl_transaction_cmd.h	2005-05-13 12:33:26.976005000 -0700
+++ linux-kernel9/test/dapltest/include/dapl_transaction_cmd.h	2005-05-13 14:14:08.135988000 -0700
@@ -58,7 +58,7 @@ typedef struct {
     enum dat_qos         ReliabilityLevel;
     uint32_t num_ops;
     Transaction_Cmd_Op_t op[MAX_OPS];
-    DAT_MEM_TYPE    DT_mem_type; /* -M */
+    enum dat_mem_type    DT_mem_type; /* -M */
 } Transaction_Cmd_t;
 #pragma pack ()
 
diff -Nurp -X /home/tduffy/dontdiff linux-kernel8/test/dapltest/test/dapl_bpool.c linux-kernel9/test/dapltest/test/dapl_bpool.c
--- linux-kernel8/test/dapltest/test/dapl_bpool.c	2005-05-13 11:38:08.187002000 -0700
+++ linux-kernel9/test/dapltest/test/dapl_bpool.c	2005-05-13 14:14:08.140007000 -0700
@@ -103,7 +103,7 @@ DT_BpoolAlloc (
     DAT_REGION_DESCRIPTION  region;
     u32              ret = DAT_SUCCESS;
     u64                bp_len;
-    DAT_MEM_TYPE            DT_mem_type;
+    enum dat_mem_type            DT_mem_type;
     u64            buf_region[10];
     if (pt_ptr != NULL) {
         DT_mem_type = pt_ptr->Params.mem_type;




More information about the general mailing list