[ofa-general] [PATCH - 8] mlx4_ib configure QP's max nessage size

Eli Cohen eli at mellanox.co.il
Wed Aug 15 11:19:43 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>

---

Please note the two previous patches were numbered 6. "fix typo" is 6
and "s/g" is 7.

Index: linux-2.6.23-rc1/drivers/infiniband/hw/mlx4/qp.c
===================================================================
--- linux-2.6.23-rc1.orig/drivers/infiniband/hw/mlx4/qp.c	2007-08-15 20:50:30.000000000 +0300
+++ linux-2.6.23-rc1/drivers/infiniband/hw/mlx4/qp.c	2007-08-15 20:50:34.000000000 +0300
@@ -746,7 +746,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