IB/mlx4: Allow 4K messages for UD QPs
authorAlex Naslednikov <xalex@mellanox.co.il>
Thu, 7 Aug 2008 21:06:50 +0000 (14:06 -0700)
committerRoland Dreier <rolandd@cisco.com>
Thu, 7 Aug 2008 21:06:50 +0000 (14:06 -0700)
Current code limits the max message size to 2K for UD QPs, while MTU
might be as big as 4K.  This patch sets the maximum message size to
4K, which is needed for UD to work correctly on fabrics with a 4K MTU.

Signed-off-by: Alex Naslednikov <xalex@mellanox.co.il>
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mlx4/qp.c

index f7bc7dd8578a558704d32846cc2f24b99dfe0304..f29dbb767e87c3c0f77b5f23c8c58de06e85c169 100644 (file)
@@ -902,7 +902,7 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp,
                        context->mtu_msgmax = (IB_MTU_4096 << 5) |
                                              ilog2(dev->dev->caps.max_gso_sz);
                else
-                       context->mtu_msgmax = (IB_MTU_4096 << 5) | 11;
+                       context->mtu_msgmax = (IB_MTU_4096 << 5) | 12;
        } else if (attr_mask & IB_QP_PATH_MTU) {
                if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_4096) {
                        printk(KERN_ERR "path MTU (%u) is invalid\n",