[openib-general] [PATCH] - kernel cmatose fix

Steve Wise swise at opengridcomputing.com
Thu Apr 27 11:59:50 PDT 2006


cmatose cannot bind to the same local port for all connections.  This
will fail on iwarp devices.  This patch simply doesn't select the port
for the client side. 

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

Index: cmatose.c
===================================================================
--- cmatose.c	(revision 6421)
+++ cmatose.c	(working copy)
@@ -86,7 +86,7 @@
 };
 
 static struct cmatest test;
-static char *src_ip = "000.000.000.000";
+static char *src_ip = "x00.000.000.000";
 static char *dst_ip = "x00.000.000.000";
 static int connections = 1;
 static int message_size = 100;
@@ -447,9 +447,10 @@
 		message_count = 0;
 
 	test.src_in.sin_family = AF_INET;
-	test.src_in.sin_port = 7471;
-	if (src_ip)
+	if (src_ip[0] != 'x') {
+		test.src_in.sin_port = 7471;
 		test.src_in.sin_addr.s_addr = in_aton(src_ip);
+	}
 	test.src_addr = (struct sockaddr *) &test.src_in;
 
 	if (dst_ip[0] != 'x') {




More information about the general mailing list