IB/mlx4: Allow 4K messages for UD QPs

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>

authored by Alex Naslednikov and committed by Roland Dreier 6e0d733d f780a9f1

+1 -1
+1 -1
drivers/infiniband/hw/mlx4/qp.c
··· 902 context->mtu_msgmax = (IB_MTU_4096 << 5) | 903 ilog2(dev->dev->caps.max_gso_sz); 904 else 905 - context->mtu_msgmax = (IB_MTU_4096 << 5) | 11; 906 } else if (attr_mask & IB_QP_PATH_MTU) { 907 if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_4096) { 908 printk(KERN_ERR "path MTU (%u) is invalid\n",
··· 902 context->mtu_msgmax = (IB_MTU_4096 << 5) | 903 ilog2(dev->dev->caps.max_gso_sz); 904 else 905 + context->mtu_msgmax = (IB_MTU_4096 << 5) | 12; 906 } else if (attr_mask & IB_QP_PATH_MTU) { 907 if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_4096) { 908 printk(KERN_ERR "path MTU (%u) is invalid\n",