[openib-general] [PATCH] perftest: updates for latest librdmacm

Steve Wise swise at opengridcomputing.com
Wed Nov 1 08:44:03 PST 2006


Here is a patch that updates the src/userspace/perftest to the librdmacm
patch Sean posted for supporting kernel ABI version 3 which is under
review for 2.6.20.


Signed-off-by: Steve Wise <swise at opengridcomputing.com>


Index: rdma_bw.c
===================================================================
--- rdma_bw.c	(revision 9974)
+++ rdma_bw.c	(working copy)
@@ -211,19 +211,18 @@
  					pid, __func__, event->event);
 			goto err1;
 		}
-		if (!event->private_data || 
-			(event->private_data_len < sizeof(*data->rem_dest))) {
+		if (!event->param.conn.private_data || 
+		    (event->param.conn.private_data_len < sizeof(*data->rem_dest))) {
 			fprintf(stderr, "%d:%s: bad private data ptr %p len %d\n",  
-				pid, __func__, event->private_data, 
-				event->private_data_len);
+				pid, __func__, event->param.conn.private_data, 
+				event->param.conn.private_data_len);
 			goto err1;
 		}
 		data->rem_dest = malloc(sizeof *data->rem_dest);
 		if (!data->rem_dest)
 			goto err1;
 		
-		memcpy(data->rem_dest, event->private_data, 
-					sizeof(*data->rem_dest));
+		memcpy(data->rem_dest, event->param.conn.private_data, sizeof(*data->rem_dest));
 		rdma_ack_cm_event(event);
 
 	} else {
@@ -355,10 +354,10 @@
 			goto err2;
 		}
 	
-		if (!event->private_data ||
-			 (event->private_data_len < sizeof(*data->rem_dest))) {
+		if (!event->param.conn.private_data ||
+		    (event->param.conn.private_data_len < sizeof(*data->rem_dest))) {
 			fprintf(stderr, "%d:%s: bad private data len %d\n", pid,
-				 		__func__, event->private_data_len);
+				__func__, event->param.conn.private_data_len);
 			goto err2;
 		}
 		
@@ -366,7 +365,7 @@
 		if (!data->rem_dest)
 			goto err2;
 
-		memcpy(data->rem_dest, event->private_data, sizeof(*data->rem_dest));
+		memcpy(data->rem_dest, event->param.conn.private_data, sizeof(*data->rem_dest));
 
 		child_cm_id = (struct rdma_cm_id *)event->id;
 		ctx = pp_init_ctx(child_cm_id, data);
Index: rdma_lat.c
===================================================================
--- rdma_lat.c	(revision 9974)
+++ rdma_lat.c	(working copy)
@@ -285,19 +285,18 @@
  					pid, __func__, event->event);
 			goto err1;
 		}
-		if (!event->private_data || 
-			(event->private_data_len < sizeof(*data->rem_dest))) {
+		if (!event->param.conn.private_data || 
+		    (event->param.conn.private_data_len < sizeof(*data->rem_dest))) {
 			fprintf(stderr, "%d:%s: bad private data ptr %p len %d\n",  
-				pid, __func__, event->private_data, 
-				event->private_data_len);
+				pid, __func__, event->param.conn.private_data, 
+				event->param.conn.private_data_len);
 			goto err1;
 		}
 		data->rem_dest = malloc(sizeof *data->rem_dest);
 		if (!data->rem_dest)
 			goto err1;
 		
-		memcpy(data->rem_dest, event->private_data, 
-					sizeof(*data->rem_dest));
+		memcpy(data->rem_dest, event->param.conn.private_data, sizeof(*data->rem_dest));
 		rdma_ack_cm_event(event);
 	} else {
 		for (t = res; t; t = t->ai_next) {
@@ -399,10 +398,10 @@
 			goto err2;
 		}
 	
-		if (!event->private_data ||
-			 (event->private_data_len < sizeof(*data->rem_dest))) {
+		if (!event->param.conn.private_data ||
+		    (event->param.conn.private_data_len < sizeof(*data->rem_dest))) {
 			fprintf(stderr, "%d:%s: bad private data len %d\n", pid,
-				 		__func__, event->private_data_len);
+				__func__, event->param.conn.private_data_len);
 			goto err2;
 		}
 		
@@ -410,7 +409,7 @@
 		if (!data->rem_dest)
 			goto err2;
 
-		memcpy(data->rem_dest, event->private_data, sizeof(*data->rem_dest));
+		memcpy(data->rem_dest, event->param.conn.private_data, sizeof(*data->rem_dest));
 
 		child_cm_id = (struct rdma_cm_id *)event->id;
 		ctx = pp_init_ctx(child_cm_id, data);






More information about the general mailing list