[openib-general] [PATCH][7/26] kDAPL: Remove typedef DAT_EP_ATTR

Tom Duffy Tom.Duffy at Sun.COM
Mon May 9 14:39:41 PDT 2005


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

diff -Nur -X /home/tduffy/dontdiff linux-kernel6/dat/dat.h linux-kernel7/dat/dat.h
--- linux-kernel6/dat/dat.h	2005-05-09 12:09:01.001003000 -0700
+++ linux-kernel7/dat/dat.h	2005-05-09 12:17:29.401004000 -0700
@@ -572,7 +572,7 @@
 };
 
 /* Endpoint attributes */
-typedef struct dat_ep_attr {
+struct dat_ep_attr {
 	DAT_VLEN max_message_size;
 	DAT_VLEN max_rdma_size;
 	DAT_QOS qos;
@@ -591,7 +591,7 @@
 	struct dat_named_attr *ep_transport_specific;
 	DAT_COUNT ep_provider_specific_count;
 	struct dat_named_attr *ep_provider_specific;
-} DAT_EP_ATTR;
+};
 
 /* Endpoint Parameters */
 typedef enum dat_ep_state {
@@ -622,7 +622,7 @@
 	DAT_EVD_HANDLE request_evd_handle;
 	DAT_EVD_HANDLE connect_evd_handle;
 	DAT_SRQ_HANDLE srq_handle;
-	DAT_EP_ATTR ep_attr;
+	struct dat_ep_attr ep_attr;
 } DAT_EP_PARAM;
 
 typedef enum dat_ep_param_mask {
@@ -1146,11 +1146,11 @@
 
 typedef DAT_RETURN (*DAT_EP_CREATE_FUNC) (
         DAT_IA_HANDLE, DAT_PZ_HANDLE, DAT_EVD_HANDLE, DAT_EVD_HANDLE, 
-        DAT_EVD_HANDLE, const DAT_EP_ATTR *, DAT_EP_HANDLE *);
+        DAT_EVD_HANDLE, const struct dat_ep_attr *, DAT_EP_HANDLE *);
 
 typedef DAT_RETURN (*DAT_EP_CREATE_WITH_SRQ_FUNC) (
         DAT_IA_HANDLE, DAT_PZ_HANDLE, DAT_EVD_HANDLE, DAT_EVD_HANDLE,
-        DAT_EVD_HANDLE, DAT_SRQ_HANDLE, const DAT_EP_ATTR *, DAT_EP_HANDLE *);
+        DAT_EVD_HANDLE, DAT_SRQ_HANDLE, const struct dat_ep_attr *, DAT_EP_HANDLE *);
 
 typedef DAT_RETURN (*DAT_EP_QUERY_FUNC) (DAT_EP_HANDLE, DAT_EP_PARAM *);
 
@@ -1530,7 +1530,7 @@
                                        DAT_EVD_HANDLE in_evd,
                                        DAT_EVD_HANDLE out_evd, 
                                        DAT_EVD_HANDLE connect_evd,
-                                       const DAT_EP_ATTR * attr, 
+                                       const struct dat_ep_attr *attr, 
                                        DAT_EP_HANDLE * ep)
 {
         return DAT_CALL_PROVIDER_FUNC(
@@ -1544,7 +1544,7 @@
                                                 DAT_EVD_HANDLE out_evd,
                                                 DAT_EVD_HANDLE connect_evd, 
                                                 DAT_SRQ_HANDLE srq,
-                                                const DAT_EP_ATTR * attr, 
+                                                const struct dat_ep_attr *attr, 
                                                 DAT_EP_HANDLE * ep)
 {
         return DAT_CALL_PROVIDER_FUNC(ep_create_with_srq_func, ia, pz, in_evd, 
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/dat-provider/dapl_adapter_util.h linux-kernel7/dat-provider/dapl_adapter_util.h
--- linux-kernel6/dat-provider/dapl_adapter_util.h	2005-05-09 11:56:04.963050000 -0700
+++ linux-kernel7/dat-provider/dapl_adapter_util.h	2005-05-09 12:17:54.079004000 -0700
@@ -69,7 +69,7 @@
 DAT_RETURN dapl_ib_qp_free(DAPL_IA * ia_ptr, DAPL_EP * ep_ptr);
 
 DAT_RETURN dapl_ib_qp_modify(DAPL_IA * ia_ptr,
-			     DAPL_EP * ep_ptr, DAT_EP_ATTR * ep_attr);
+			     DAPL_EP * ep_ptr, struct dat_ep_attr *ep_attr);
 
 DAT_RETURN dapl_ib_connect(DAT_EP_HANDLE ep_handle,
 			   DAT_IA_ADDRESS_PTR remote_ia_address,
@@ -147,7 +147,8 @@
 
 DAT_RETURN dapl_ib_query_hca(DAPL_HCA * hca_ptr,
 			     DAT_IA_ATTR * ia_attr,
-			     DAT_EP_ATTR * ep_attr, DAT_SOCK_ADDR6 * ip_addr);
+			     struct dat_ep_attr *ep_attr,
+			     DAT_SOCK_ADDR6 * ip_addr);
 
 DAT_RETURN dapl_ib_completion_poll(DAPL_HCA * hca_ptr,
 				   DAPL_EVD * evd_ptr,
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/dat-provider/dapl_ep_create.c linux-kernel7/dat-provider/dapl_ep_create.c
--- linux-kernel6/dat-provider/dapl_ep_create.c	2005-05-09 11:07:01.700016000 -0700
+++ linux-kernel7/dat-provider/dapl_ep_create.c	2005-05-09 12:18:42.251015000 -0700
@@ -69,11 +69,11 @@
 	       DAT_EVD_HANDLE recv_evd_handle,
 	       DAT_EVD_HANDLE request_evd_handle,
 	       DAT_EVD_HANDLE connect_evd_handle,
-	       const DAT_EP_ATTR * ep_attr, DAT_EP_HANDLE * ep_handle)
+	       const struct dat_ep_attr *ep_attr, DAT_EP_HANDLE * ep_handle)
 {
 	DAPL_IA *ia_ptr;
 	DAPL_EP *ep_ptr;
-	DAT_EP_ATTR ep_attr_limit;
+	struct dat_ep_attr ep_attr_limit;
 	DAT_RETURN dat_status;
 
 	dapl_dbg_log(DAPL_DBG_TYPE_API,
@@ -172,7 +172,7 @@
 
 	/* Verify the attributes against the transport */
 	if (ep_attr != NULL) {
-		memset(&ep_attr_limit, 0, sizeof(DAT_EP_ATTR));
+		memset(&ep_attr_limit, 0, sizeof ep_attr_limit);
 		dat_status = dapl_ib_query_hca(ia_ptr->hca_ptr,
 					       NULL, &ep_attr_limit, NULL);
 		if (dat_status != DAT_SUCCESS) {
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/dat-provider/dapl_ep_create_with_srq.c linux-kernel7/dat-provider/dapl_ep_create_with_srq.c
--- linux-kernel6/dat-provider/dapl_ep_create_with_srq.c	2005-05-09 11:07:01.993022000 -0700
+++ linux-kernel7/dat-provider/dapl_ep_create_with_srq.c	2005-05-09 12:19:41.681004000 -0700
@@ -76,11 +76,12 @@
 			DAT_EVD_HANDLE request_evd_handle,
 			DAT_EVD_HANDLE connect_evd_handle,
 			DAT_SRQ_HANDLE srq_handle,
-			const DAT_EP_ATTR * ep_attr, DAT_EP_HANDLE * ep_handle)
+			const struct dat_ep_attr *ep_attr,
+			DAT_EP_HANDLE * ep_handle)
 {
 	DAPL_IA *ia_ptr;
 	DAPL_EP *ep_ptr;
-	DAT_EP_ATTR ep_attr_limit;
+	struct dat_ep_attr ep_attr_limit;
 	DAT_RETURN dat_status;
 
 	dat_status = DAT_SUCCESS;
@@ -187,7 +188,7 @@
 
 	/* Verify the attributes against the transport */
 	if (ep_attr != NULL) {
-		memset(&ep_attr_limit, 0, sizeof(DAT_EP_ATTR));
+		memset(&ep_attr_limit, 0, sizeof ep_attr_limit);
 		dat_status = dapl_ib_query_hca(ia_ptr->hca_ptr,
 					       NULL, &ep_attr_limit, NULL);
 		if (dat_status != DAT_SUCCESS) {
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/dat-provider/dapl_ep_modify.c linux-kernel7/dat-provider/dapl_ep_modify.c
--- linux-kernel6/dat-provider/dapl_ep_modify.c	2005-05-04 08:19:32.748971000 -0700
+++ linux-kernel7/dat-provider/dapl_ep_modify.c	2005-05-09 12:20:20.503018000 -0700
@@ -57,13 +57,14 @@
 				   DAT_EP_PARAM_MASK mask,
 				   const DAT_EP_PARAM * ep_param,
 				   DAPL_IA ** ia_ptr,
-				   DAPL_EP ** ep_ptr, DAT_EP_ATTR * ep_attr_ptr)
+				   DAPL_EP ** ep_ptr,
+				   struct dat_ep_attr *ep_attr_ptr)
 {
 	DAPL_IA *ia;
 	DAPL_EP *ep;
-	DAT_EP_ATTR ep_attr;
-	DAT_EP_ATTR ep_attr_limit;
-	DAT_EP_ATTR ep_attr_request;
+	struct dat_ep_attr ep_attr;
+	struct dat_ep_attr ep_attr_limit;
+	struct dat_ep_attr ep_attr_request;
 	DAT_RETURN dat_status;
 
 	*ia_ptr = NULL;
@@ -174,7 +175,7 @@
 	 */
 	ep_attr = ep->param.ep_attr;
 
-	memset(&ep_attr_limit, 0, sizeof(DAT_EP_ATTR));
+	memset(&ep_attr_limit, 0, sizeof ep_attr_limit);
 	dat_status = dapl_ib_query_hca(ia->hca_ptr, NULL, &ep_attr_limit, NULL);
 	if (dat_status != DAT_SUCCESS) {
 		goto bail;
@@ -313,7 +314,7 @@
 {
 	DAPL_IA *ia;
 	DAPL_EP *ep1, *ep2;
-	DAT_EP_ATTR ep_attr1, ep_attr2;
+	struct dat_ep_attr ep_attr1, ep_attr2;
 	DAPL_EP new_ep, copy_of_old_ep;
 	DAPL_EP alloc_ep;	/* Holder for resources.  */
 	DAPL_PZ *tmp_pz;
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/dat-provider/dapl_ep_util.c linux-kernel7/dat-provider/dapl_ep_util.c
--- linux-kernel6/dat-provider/dapl_ep_util.c	2005-05-09 11:51:34.946002000 -0700
+++ linux-kernel7/dat-provider/dapl_ep_util.c	2005-05-09 12:21:06.403014000 -0700
@@ -75,7 +75,7 @@
  * 	none
  *
  */
-DAPL_EP *dapl_ep_alloc(DAPL_IA * ia_ptr, const DAT_EP_ATTR * ep_attr)
+DAPL_EP *dapl_ep_alloc(DAPL_IA * ia_ptr, const struct dat_ep_attr *ep_attr)
 {
 	DAPL_EP *ep_ptr;
 
@@ -223,11 +223,11 @@
  */
 void dapl_ep_default_attrs(DAPL_EP * ep_ptr)
 {
-	DAT_EP_ATTR *ep_attr;
+	struct dat_ep_attr *ep_attr;
 
 	ep_attr = &ep_ptr->param.ep_attr;
 	/* Set up defaults */
-	memset(ep_attr, 0, sizeof(DAT_EP_ATTR));
+	memset(ep_attr, 0, sizeof *ep_attr);
 
 	/* mtu and rdma sizes fixed in IB as per IBTA 1.1, 9.4.3, 9.4.4, 9.7.7.  */
 	ep_attr->max_message_size = 0x80000000;
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/dat-provider/dapl_ep_util.h linux-kernel7/dat-provider/dapl_ep_util.h
--- linux-kernel6/dat-provider/dapl_ep_util.h	2005-05-09 11:51:45.071013000 -0700
+++ linux-kernel7/dat-provider/dapl_ep_util.h	2005-05-09 12:21:22.479009000 -0700
@@ -42,7 +42,7 @@
 
 /* function prototypes */
 
-extern DAPL_EP *dapl_ep_alloc(DAPL_IA * ia, const DAT_EP_ATTR * ep_attr);
+extern DAPL_EP *dapl_ep_alloc(DAPL_IA * ia, const struct dat_ep_attr *ep_attr);
 
 extern void dapl_ep_dealloc(DAPL_EP * ep_ptr);
 
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/dat-provider/dapl.h linux-kernel7/dat-provider/dapl.h
--- linux-kernel6/dat-provider/dapl.h	2005-05-09 12:08:08.092003000 -0700
+++ linux-kernel7/dat-provider/dapl.h	2005-05-09 12:16:33.808001000 -0700
@@ -561,7 +561,7 @@
 				 DAT_EVD_HANDLE,	/* in_dto_completion_evd_handle */
 				 DAT_EVD_HANDLE,	/* out_dto_completion_evd_handle */
 				 DAT_EVD_HANDLE,	/* connect_evd_handle */
-				 const DAT_EP_ATTR *,	/* ep_parameters */
+				 const struct dat_ep_attr *,	/* ep_parameters */
 				 DAT_EP_HANDLE *);	/* ep_handle */
 
 extern DAT_RETURN dapl_ep_query(DAT_EP_HANDLE, DAT_EP_PARAM *);
@@ -630,7 +630,7 @@
 					  DAT_EVD_HANDLE,	/* request_evd_handle   */
 					  DAT_EVD_HANDLE,	/* connect_evd_handle   */
 					  DAT_SRQ_HANDLE,	/* srq_handle           */
-					  const DAT_EP_ATTR *,	/* ep_attributes        */
+					  const struct dat_ep_attr *,	/* ep_attributes        */
 					  DAT_EP_HANDLE *);	/* ep_handle            */
 
 extern DAT_RETURN dapl_ep_recv_query(DAT_EP_HANDLE,	/* ep_handle            */
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/dat-provider/dapl_ia_util.c linux-kernel7/dat-provider/dapl_ia_util.c
--- linux-kernel6/dat-provider/dapl_ia_util.c	2005-05-09 11:56:04.969021000 -0700
+++ linux-kernel7/dat-provider/dapl_ia_util.c	2005-05-09 12:21:52.042013000 -0700
@@ -190,10 +190,10 @@
 		}
 		/* force the EP into error state to force flush all posted DTOs. */
 		{
-			DAT_EP_ATTR ep_attr;
+			struct dat_ep_attr ep_attr;
 			struct dat_named_attr ep_state;
 
-			memset(&ep_attr, 0, sizeof(DAT_EP_ATTR));
+			memset(&ep_attr, 0, sizeof ep_attr);
 			ep_state.name = (char *)IB_QP_STATE;
 			ep_state.value = (char *)DAPL_QP_STATE_ERROR;
 			ep_attr.ep_provider_specific_count = 1;
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/dat-provider/dapl_openib_qp.c linux-kernel7/dat-provider/dapl_openib_qp.c
--- linux-kernel6/dat-provider/dapl_openib_qp.c	2005-04-11 13:49:41.248021000 -0700
+++ linux-kernel7/dat-provider/dapl_openib_qp.c	2005-05-09 12:22:24.354000000 -0700
@@ -70,7 +70,7 @@
 DAT_RETURN
 dapl_ib_qp_alloc(DAPL_IA * ia_ptr, DAPL_EP * ep_ptr, DAPL_EP * ep_ctx_ptr)
 {
-	DAT_EP_ATTR *attr;
+	struct dat_ep_attr *attr;
 	int ib_status;
 	struct ib_qp_init_attr qp_attr;
 	struct ib_pd *ib_pd_handle;
@@ -232,7 +232,8 @@
  *
  */
 DAT_RETURN
-dapl_ib_qp_modify(DAPL_IA * ia_ptr, DAPL_EP * ep_ptr, DAT_EP_ATTR * ep_attr)
+dapl_ib_qp_modify(DAPL_IA * ia_ptr, DAPL_EP * ep_ptr,
+		  struct dat_ep_attr *ep_attr)
 {
 	struct ib_qp_attr qp_attr;
 	struct ib_qp *qp_handle;
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/dat-provider/dapl_openib_util.c linux-kernel7/dat-provider/dapl_openib_util.c
--- linux-kernel6/dat-provider/dapl_openib_util.c	2005-05-09 11:58:35.028003000 -0700
+++ linux-kernel7/dat-provider/dapl_openib_util.c	2005-05-09 12:22:39.554000000 -0700
@@ -747,7 +747,8 @@
  */
 DAT_RETURN dapl_ib_query_hca(DAPL_HCA * hca_ptr,
 			     DAT_IA_ATTR * ia_attr,
-			     DAT_EP_ATTR * ep_attr, DAT_SOCK_ADDR6 * ip_addr)
+			     struct dat_ep_attr *ep_attr,
+			     DAT_SOCK_ADDR6 * ip_addr)
 {
 	int ib_status;
 	struct ib_device_attr device_attr;
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/test/dapltest/include/dapl_performance_test.h linux-kernel7/test/dapltest/include/dapl_performance_test.h
--- linux-kernel6/test/dapltest/include/dapl_performance_test.h	2005-05-05 13:56:36.275962000 -0700
+++ linux-kernel7/test/dapltest/include/dapl_performance_test.h	2005-05-09 12:22:53.931012000 -0700
@@ -55,7 +55,7 @@
 typedef struct
 {
     DAT_EP_HANDLE           ep_handle;
-    DAT_EP_ATTR		    ep_attr;
+    struct dat_ep_attr	    ep_attr;
     DAT_CONN_QUAL           port;
     DAT_COUNT               pipeline_len;
     Bpool                   *bp;
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/test/dapltest/include/dapl_test_data.h linux-kernel7/test/dapltest/include/dapl_test_data.h
--- linux-kernel6/test/dapltest/include/dapl_test_data.h	2005-05-09 11:15:26.458003000 -0700
+++ linux-kernel7/test/dapltest/include/dapl_test_data.h	2005-05-09 12:16:33.875003000 -0700
@@ -82,7 +82,7 @@
     Params_t        	Params;
     DAT_IA_ATTR         ia_attr;
     struct dat_provider_attr   provider_attr;
-    DAT_EP_ATTR		ep_attr;
+    struct dat_ep_attr		ep_attr;
     Per_Server_Data_t   *ps_ptr;
     Transaction_Stats_t Client_Stats;
 
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/test/dapltest/include/dapl_transaction_test.h linux-kernel7/test/dapltest/include/dapl_transaction_test.h
--- linux-kernel6/test/dapltest/include/dapl_transaction_test.h	2005-05-05 13:57:04.196965000 -0700
+++ linux-kernel7/test/dapltest/include/dapl_transaction_test.h	2005-05-09 12:23:07.735003000 -0700
@@ -50,7 +50,7 @@
 typedef struct
 {
     DAT_EP_HANDLE           ep_handle;
-    DAT_EP_ATTR		    ep_attr;
+    struct dat_ep_attr	    ep_attr;
     DAT_CONN_QUAL           ia_port;
     Bpool                   *bp;
     Transaction_Test_Op_t   op[ MAX_OPS ];
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/test/dapltest/test/dapl_client.c linux-kernel7/test/dapltest/test/dapl_client.c
--- linux-kernel6/test/dapltest/test/dapl_client.c	2005-05-05 13:45:21.784000000 -0700
+++ linux-kernel7/test/dapltest/test/dapl_client.c	2005-05-09 12:16:33.887002000 -0700
@@ -179,7 +179,7 @@
 			recv_evd_hdl,		/* recv     */
 			reqt_evd_hdl,		/* request  */
 			conn_evd_hdl,		/* connect  */
-			(DAT_EP_ATTR *) NULL,
+			(struct dat_ep_attr *) NULL,
 			&ep_handle);
     if (ret != DAT_SUCCESS)
     {
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/test/dapltest/test/dapl_limit.c linux-kernel7/test/dapltest/test/dapl_limit.c
--- linux-kernel6/test/dapltest/test/dapl_limit.c	2005-05-09 11:44:35.444001000 -0700
+++ linux-kernel7/test/dapltest/test/dapl_limit.c	2005-05-09 12:16:33.897001000 -0700
@@ -583,7 +583,7 @@
 				hdl_sets[w].evd_handle,	/* recv	    */
 				hdl_sets[w].evd_handle,	/* request  */
 				conn_handle,		/* connect  */
-				(DAT_EP_ATTR *) NULL,
+				(struct dat_ep_attr *) NULL,
 				&hdl_sets[w].ep_handle);
 	    if (ret != DAT_SUCCESS)
 	    {
@@ -628,7 +628,7 @@
 				    hdl_sets[w % cmd->width].evd_handle,
 				    hdl_sets[w % cmd->width].evd_handle,
 				     conn_handle,		/* connect  */
-				    (DAT_EP_ATTR *) NULL,
+				    (struct dat_ep_attr *) NULL,
 				    &hdlptr[w]);
 		if (ret != DAT_SUCCESS)
 		{
@@ -728,7 +728,7 @@
 				    hdl_sets[w % cmd->width].evd_handle,
 				    hdl_sets[w % cmd->width].evd_handle,
 				    conn_handle,
-				    (DAT_EP_ATTR *) NULL,
+				    (struct dat_ep_attr *) NULL,
 				    &epptr[w]);
 		if (ret != DAT_SUCCESS)
 		{
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/test/dapltest/test/dapl_server.c linux-kernel7/test/dapltest/test/dapl_server.c
--- linux-kernel6/test/dapltest/test/dapl_server.c	2005-05-05 09:42:06.394000000 -0700
+++ linux-kernel7/test/dapltest/test/dapl_server.c	2005-05-09 12:16:33.904000000 -0700
@@ -195,7 +195,7 @@
 			 ps_ptr->recv_evd_hdl,	 /* recv     */
 			 ps_ptr->reqt_evd_hdl,	 /* request  */
 			 ps_ptr->conn_evd_hdl,	 /* connect  */
-			 (DAT_EP_ATTR *) NULL,
+			 (struct dat_ep_attr *) NULL,
 			 &ps_ptr->ep_handle);
     if (ret != DAT_SUCCESS)
     {
diff -Nur -X /home/tduffy/dontdiff linux-kernel6/test/dapltest/test/dapl_transaction_test.c linux-kernel7/test/dapltest/test/dapl_transaction_test.c
--- linux-kernel6/test/dapltest/test/dapl_transaction_test.c	2005-05-05 13:45:21.794000000 -0700
+++ linux-kernel7/test/dapltest/test/dapl_transaction_test.c	2005-05-09 12:23:41.376001000 -0700
@@ -344,7 +344,7 @@
      */
     for (i = 0;  i < test_ptr->cmd->eps_per_thread;  i++)
     {
-	DAT_EP_ATTR	    ep_attr;
+	struct dat_ep_attr ep_attr;
 	u32	    buff_size  =  MAX_OPS * sizeof (RemoteMemoryInfo);
 
 	/*




More information about the general mailing list