[openib-general] [PATCH for-2.6.18] IB/cma: option to limit MTU to 1K

Michael S. Tsirkin mst at mellanox.co.il
Wed Sep 13 08:57:26 PDT 2006


Tavor systems get better performance with 1K MTU. Since there does
not seem to be any way to find out whether the remote system uses Tavor,
add an option to limit the MTU globally.

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

---

Sean, can you ack the following for 2.6.18 please?

Index: linux-2.6.18-rc2-devel/drivers/infiniband/core/cma.c
===================================================================
--- linux-2.6.18-rc2-devel.orig/drivers/infiniband/core/cma.c	2006-09-11 16:01:37.000000000 +0300
+++ linux-2.6.18-rc2-devel/drivers/infiniband/core/cma.c	2006-09-13 18:51:45.000000000 +0300
@@ -48,6 +48,10 @@ MODULE_AUTHOR("Sean Hefty");
 MODULE_DESCRIPTION("Generic RDMA CM Agent");
 MODULE_LICENSE("Dual BSD/GPL");
 
+static int tavor_quirk = 0;
+module_param_named(tavor_quirk, tavor_quirk, int, 0644);
+MODULE_PARM_DESC(tavor_quirk, "Tavor performance quirk: limit MTU to 1K if > 0");
+
 #define CMA_CM_RESPONSE_TIMEOUT 20
 #define CMA_MAX_CM_RETRIES 3
 
@@ -1123,6 +1127,11 @@ static int cma_query_ib_route(struct rdm
 	path_rec.pkey = cpu_to_be16(ib_addr_get_pkey(addr));
 	path_rec.numb_path = 1;
 
+	if (tavor_quirk) {
+		path_rec.mtu_selector = IB_SA_LTE;
+		path_rec.mtu = IB_MTU_1024;
+	}
+
 	id_priv->query_id = ib_sa_path_rec_get(id_priv->id.device,
 				id_priv->id.port_num, &path_rec,
 				IB_SA_PATH_REC_DGID | IB_SA_PATH_REC_SGID |

-- 
MST




More information about the general mailing list