diff mbox

[2/4] dapl/dtest: remove direct include of infiniband/verbs.h

Message ID F9C156C6B6A34461826AD1BA8274E8FE@amr.corp.intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Hefty, Sean Sept. 30, 2009, 11:13 p.m. UTC
None
diff mbox

Patch

diff --git a/test/dtest/dtest.c b/test/dtest/dtest.c
index 75cbe4c..22999f7 100755
--- a/test/dtest/dtest.c
+++ b/test/dtest/dtest.c
@@ -100,7 +100,6 @@ 
 #define MAX_PROCS      1000
 
 /* Header files needed for DAT/uDAPL */
-#include "infiniband/verbs.h"
 #include "dat2/udat.h"
 
 /* definitions */
@@ -219,7 +218,7 @@  union dcm_addr {
 		uint8_t		port_num;
 		uint16_t	lid;
 		uint32_t	qpn;
-		union ibv_gid	gid;
+		uint8_t		gid[16];
 	} ib;
 };
 
@@ -447,15 +446,12 @@  int main(int argc, char **argv)
 		(void*)ia_attr.ia_address_ptr,
 		sizeof(DAT_SOCK_ADDR6));
 
-	if (local.ib.qp_type == IBV_QPT_UD) {
-		ucm = 1;
-		printf("%d Local uCM Address = QPN=0x%x, LID=0x%x\n",
-			getpid(), ntohl(local.ib.qpn),
-			ntohs(local.ib.lid));
-		printf("%d Remote uCM Address = QPN=0x%x, LID=0x%x\n",
-			getpid(), ntohl(remote.ib.qpn),
-			ntohs(remote.ib.lid));
-	}
+        printf("%d Local Address %s port %d\n", getpid(),
+               inet_ntoa(((struct sockaddr_in *) &local)->sin_addr),
+               ((struct sockaddr_in *) &local)->sin_port);
+	printf("%d Local Address QPN=0x%x, LID=0x%x\n", 
+		getpid(), ntohl(local.ib.qpn), 
+		ntohs(local.ib.lid));
 
 	/* Create Protection Zone */
 	start = get_time();
diff --git a/test/dtest/dtestcm.c b/test/dtest/dtestcm.c
index 5b0272a..427a25e 100644
--- a/test/dtest/dtestcm.c
+++ b/test/dtest/dtestcm.c
@@ -97,7 +97,6 @@ 
 #define MAX_POLLING_CNT 50000
 
 /* Header files needed for DAT/uDAPL */
-#include "infiniband/verbs.h"
 #include "dat2/udat.h"
 #include "dat2/dat_ib_extensions.h"
 
@@ -109,7 +108,7 @@  union dcm_addr {
 		uint8_t		port_num;
 		uint16_t	lid;
 		uint32_t	qpn;
-		union ibv_gid	gid;
+		uint8_t		gid[16];
 	} ib;
 };
 
@@ -338,15 +337,12 @@  int main(int argc, char **argv)
 	       (void*)ia_attr.ia_address_ptr, 
 	        sizeof(DAT_SOCK_ADDR6));
 
-	if (local.ib.qp_type == IBV_QPT_UD) {
-		ucm = 1;
-		printf("%d Local uCM Address = QPN=0x%x, LID=0x%x\n", 
-			getpid(), ntohl(local.ib.qpn), 
-			ntohs(local.ib.lid));
-		printf("%d Remote uCM Address = QPN=0x%x, LID=0x%x\n", 
-			getpid(), ntohl(remote.ib.qpn), 
-			ntohs(remote.ib.lid));
-	} 
+        printf("%d Local Address %s port %d\n", getpid(),
+               inet_ntoa(((struct sockaddr_in *) &local)->sin_addr),
+               ((struct sockaddr_in *) &local)->sin_port);
+	printf("%d Local Address QPN=0x%x, LID=0x%x\n", 
+		getpid(), ntohl(local.ib.qpn), 
+		ntohs(local.ib.lid));
 
 	/* Create Protection Zone */
 	start = get_time();
diff --git a/test/dtest/dtestx.c b/test/dtest/dtestx.c
index 6e17b6d..f41ad66 100755
--- a/test/dtest/dtestx.c
+++ b/test/dtest/dtestx.c
@@ -65,7 +65,6 @@ 
 
 #endif
 
-#include "infiniband/verbs.h"
 #include "dat2/udat.h"
 #include "dat2/dat_ib_extensions.h"
 
@@ -189,7 +188,7 @@  union dcm_addr {
 		uint8_t		port_num;
 		uint16_t	lid;
 		uint32_t	qpn;
-		union ibv_gid	gid;
+		uint8_t 	gid[16];
 	} ib;
 };
 
@@ -444,23 +443,12 @@  int connect_ep(char *hostname)
 		(void*)ia_attr.ia_address_ptr,
 		sizeof(DAT_SOCK_ADDR6));
 
-	if (local.ib.qp_type == IBV_QPT_UD) {
-		ucm = 1;
-
-		if (ud_test) {
-			printf("%d UD test over UCM provider not supported\n",
-				getpid());
-			exit(1);
-		}
-
-		printf("%d Local uCM Address = QPN=0x%x, LID=0x%x\n",
-			getpid(), ntohl(local.ib.qpn),
-			ntohs(local.ib.lid));
-		printf("%d Remote uCM Address = QPN=0x%x, LID=0x%x\n",
-			getpid(), ntohl(remote.ib.qpn),
-			ntohs(remote.ib.lid));
-	}
-
+        printf("%d Local Address %s port %d\n", getpid(),
+               inet_ntoa(((struct sockaddr_in *) &local)->sin_addr),
+               ((struct sockaddr_in *) &local)->sin_port);
+	printf("%d Local Address QPN=0x%x, LID=0x%x\n", 
+		getpid(), ntohl(local.ib.qpn), 
+		ntohs(local.ib.lid));
 
 	/* Print provider specific attributes */
 	for (i = 0; i < prov_attrs.num_provider_specific_attr; i++) {