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

Signed-off-by: Eli Cohen <[EMAIL PROTECTED]>

---

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)

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to