[ofa-general] [PATCH] IB/mlx4: Configure QP's max message size

Eli Cohen eli at dev.mellanox.co.il
Thu Jun 19 07:28:02 PDT 2008


>From 78f13ca2204743b0ab7ab82932c89c08e1ef674a Mon Sep 17 00:00:00 2001
From: Eli Cohen <eli at mellanox.co.il>
Date: Thu, 19 Jun 2008 17:24:07 +0300
Subject: [PATCH] IB/mlx4: Configure QP's max message size

Configure QP's max message size according to the value queried
from the HCA through QUERY_DEV_CAP.

Signed-off-by: Eli Cohen <eli at mellanox.co.il>
---
 drivers/infiniband/hw/mlx4/qp.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 8e02ecf..fe38c85 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -903,7 +903,8 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp,
 			       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)
-- 
1.5.5.4




More information about the general mailing list