[ofw] [PATCH] uDAPL v2: dtest, dtestx: modifications for UD QP testing with ucm provider.

Davis, Arlin R arlin.r.davis at intel.com
Thu Sep 3 12:28:15 PDT 2009


remote_addr is wrong for IP remote address.

The dtestx requires the server connect back to the client
for the UD test. With the ucm provider you need to provide
the QPN and the LID which you cannot get until the dtest
client starts. So, for now, don't support UD testing
on UCM providers.

Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
---
 test/dtest/dtest.c  |    2 +-
 test/dtest/dtestx.c |   22 +++++++++++++++++-----
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/test/dtest/dtest.c b/test/dtest/dtest.c
index 2f418fe..75cbe4c 100755
--- a/test/dtest/dtest.c
+++ b/test/dtest/dtest.c
@@ -1037,7 +1037,7 @@ DAT_RETURN connect_ep(char *hostname, DAT_CONN_QUAL conn_id)
 		       getpid(), (rval >> 0) & 0xff, (rval >> 8) & 0xff,
 		       (rval >> 16) & 0xff, (rval >> 24) & 0xff, conn_id);
 
-		remote_addr = (DAT_IA_ADDRESS_PTR)&target->ai_addr; /* IP */
+		remote_addr = (DAT_IA_ADDRESS_PTR)target->ai_addr; /* IP */
 no_resolution:
 		for (i = 0; i < 48; i++)	/* simple pattern in private data */
 			pdata[i] = i + 1;
diff --git a/test/dtest/dtestx.c b/test/dtest/dtestx.c
index af87af0..6e17b6d 100755
--- a/test/dtest/dtestx.c
+++ b/test/dtest/dtestx.c
@@ -349,7 +349,7 @@ void process_conn(int idx)
 	DAT_EVENT event;
 	DAT_COUNT nmore;
 	DAT_RETURN status;
-	int pdata;
+	int pdata, exp_event;
 	DAT_IB_EXTENSION_EVENT_DATA *ext_event = (DAT_IB_EXTENSION_EVENT_DATA *)
 	    & event.event_extension_data[0];
 	DAT_CONNECTION_EVENT_DATA *conn_event =
@@ -366,12 +366,17 @@ void process_conn(int idx)
 		  event.event_number, conn_event->private_data, 
 		  conn_event->private_data_size);
 
+	if (ud_test) 
+		exp_event = DAT_IB_UD_CONNECTION_EVENT_ESTABLISHED;
+	else
+		exp_event = DAT_CONNECTION_EVENT_ESTABLISHED;
+
 	/* Waiting on CR's or CONN_EST */
-	if (event.event_number != DAT_CONNECTION_EVENT_ESTABLISHED ||
+	if (event.event_number != exp_event ||  
 	    (ud_test && event.event_number !=
-	     DAT_IB_UD_CONNECTION_EVENT_ESTABLISHED)) {
+		DAT_IB_UD_CONNECTION_EVENT_ESTABLISHED)) {
 		printf("unexpected event, !conn established: 0x%x\n",
-		       event.event_number);
+		event.event_number);
 		exit(1);
 	}
 
@@ -441,6 +446,13 @@ int connect_ep(char *hostname)
 
 	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));
@@ -618,7 +630,7 @@ int connect_ep(char *hostname)
 
 		strcpy((char *)buf[SND_RDMA_BUF_INDEX], "Client written data");
 		
-		remote_addr = (DAT_IA_ADDRESS_PTR)&target->ai_addr; /* IP */
+		remote_addr = (DAT_IA_ADDRESS_PTR)target->ai_addr; /* IP */
 no_resolution:
 		
 		/* one Client EP, multiple Server EPs, same conn_qual 
-- 
1.5.2.5




More information about the ofw mailing list