[ofa-general] [PATCH 8 of 17] mlx4: configure QP max msg size

Eli Cohen eli at mellanox.co.il
Tue Sep 11 08:54:32 PDT 2007


Configure QP's max message size according to the value queried
by query dev cap. 

Signed-off-by: Eli Cohen <eli at mellnaox.co.il>

---

Index: ofa_1_3_dev_kernel/drivers/infiniband/hw/mlx4/qp.c
===================================================================
--- ofa_1_3_dev_kernel.orig/drivers/infiniband/hw/mlx4/qp.c	2007-09-11 21:15:26.000000000 +0300
+++ ofa_1_3_dev_kernel/drivers/infiniband/hw/mlx4/qp.c	2007-09-11 21:15:27.000000000 +0300
@@ -757,7 +757,8 @@ static int __mlx4_ib_modify_qp(struct ib
 			       attr->path_mtu);
 			goto out;
 		}
-		context->mtu_msgmax = (attr->path_mtu << 5) | 31;
+		context->mtu_msgmax = (attr->path_mtu << 5) |
+			ilog2(dev->dev->caps.max_msg_sz);
 	}
 
 	if (qp->rq.wqe_cnt)




More information about the general mailing list