[openib-general] [PATCH] change Mellanox SDP workaround to a module parameter

Ralph Campbell ralphc at pathscale.com
Fri Feb 3 17:05:53 PST 2006


This patch changes the hardwired MTU limit of 1024 in SDP
into a module parameter so it can be disabled for HCAs
without the RC performance problem.

Signed-off-by: Ralph Campbell <ralphc at pathscale.com>
Index: src/linux-kernel/infiniband/ulp/sdp/sdp_actv.c
===================================================================
--- src/linux-kernel/infiniband/ulp/sdp/sdp_actv.c	(revision 5294)
+++ src/linux-kernel/infiniband/ulp/sdp/sdp_actv.c	(working copy)
@@ -35,6 +35,11 @@
 
 #include "sdp_main.h"
 
+static int sdp_path_mtu_max = IB_MTU_1024;
+module_param(sdp_path_mtu_max, int, 0);
+MODULE_PARM_DESC(sdp_path_mtu_max, "Maximum path MTU to use for SDP "
+	"(0=no max, 1=256, 2=512, 3=1024, 4=2048, 5=4096)");
+
 /*
  * Connection establishment functions
  */
@@ -443,14 +448,12 @@
 	 * save message
 	 */
 	sdp_buff_q_put_tail(&conn->send_post, buff);
-#if 1
+	conn->path_mtu = path->mtu;
 	/*
 	 * Mellanox performance bug workaround.
 	 */
-	if (path->mtu > IB_MTU_1024)
-		path->mtu = IB_MTU_1024;
-#endif
-	conn->path_mtu = path->mtu;
+	if (sdp_path_mtu_max && conn->path_mtu > sdp_path_mtu_max)
+		conn->path_mtu = sdp_path_mtu_max;
 	/*
 	 * set QP/CM parameters.
 	 */

-- 
Ralph Campbell <ralphc at pathscale.com>




More information about the general mailing list