]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
IB/mlx4: Fix the SQ size of an RC QP
authorYishai Hadas <yishaih@mellanox.com>
Wed, 22 Jun 2016 14:27:28 +0000 (17:27 +0300)
committerKamal Mostafa <kamal@canonical.com>
Mon, 22 Aug 2016 14:43:05 +0000 (07:43 -0700)
BugLink: http://bugs.launchpad.net/bugs/1615620
commit f2940e2c76bb554a7fbdd28ca5b90904117a9e96 upstream.

When calculating the required size of an RC QP send queue, leave
enough space for masked atomic operations, which require more space than
"regular" atomic operation.

Fixes: 6fa8f719844b ("IB/mlx4: Add support for masked atomic operations")
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Jack Morgenstein <jackm@mellanox.co.il>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
drivers/infiniband/hw/mlx4/qp.c

index c981fba11da8d8baeb2b8b1df8e182747a7c968f..70eb83d9e3c1949e0f22dce1f9697185577213f7 100644 (file)
@@ -357,7 +357,7 @@ static int send_wqe_overhead(enum mlx4_ib_qp_type type, u32 flags)
                        sizeof (struct mlx4_wqe_raddr_seg);
        case MLX4_IB_QPT_RC:
                return sizeof (struct mlx4_wqe_ctrl_seg) +
-                       sizeof (struct mlx4_wqe_atomic_seg) +
+                       sizeof (struct mlx4_wqe_masked_atomic_seg) +
                        sizeof (struct mlx4_wqe_raddr_seg);
        case MLX4_IB_QPT_SMI:
        case MLX4_IB_QPT_GSI: