Message ID | 1455217797-15635-1-git-send-email-leonro@mellanox.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
> Fix the RC QPs send queue overhead computation to take into account > two additional segments in the WQE which are needed for registration > operations. > > The ATOMIC and UMR segments can't coexist together, so chose maximum out > of them. > > The commit 9e65dc371b5c ("IB/mlx5: Fix RC transport send queue overhead > computation") was intended to update RC transport as commit messages > states, but added the code to UC transport. > > Fixes: 9e65dc371b5c ("IB/mlx5: Fix RC transport send queue overhead computation") > Signed-off-by: Kamal Heib <kamalh@mellanox.com> > Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 02/12/2016 09:19 AM, Sagi Grimberg wrote: > >> Fix the RC QPs send queue overhead computation to take into account >> two additional segments in the WQE which are needed for registration >> operations. >> >> The ATOMIC and UMR segments can't coexist together, so chose maximum out >> of them. >> >> The commit 9e65dc371b5c ("IB/mlx5: Fix RC transport send queue overhead >> computation") was intended to update RC transport as commit messages >> states, but added the code to UC transport. >> >> Fixes: 9e65dc371b5c ("IB/mlx5: Fix RC transport send queue overhead >> computation") >> Signed-off-by: Kamal Heib <kamalh@mellanox.com> >> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> > > Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Thanks, applied.
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index 9116bc3..34cb8e8 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -270,8 +270,10 @@ static int sq_overhead(enum ib_qp_type qp_type) /* fall through */ case IB_QPT_RC: size += sizeof(struct mlx5_wqe_ctrl_seg) + - sizeof(struct mlx5_wqe_atomic_seg) + - sizeof(struct mlx5_wqe_raddr_seg); + max(sizeof(struct mlx5_wqe_atomic_seg) + + sizeof(struct mlx5_wqe_raddr_seg), + sizeof(struct mlx5_wqe_umr_ctrl_seg) + + sizeof(struct mlx5_mkey_seg)); break; case IB_QPT_XRC_TGT: @@ -279,9 +281,9 @@ static int sq_overhead(enum ib_qp_type qp_type) case IB_QPT_UC: size += sizeof(struct mlx5_wqe_ctrl_seg) + - sizeof(struct mlx5_wqe_raddr_seg) + - sizeof(struct mlx5_wqe_umr_ctrl_seg) + - sizeof(struct mlx5_mkey_seg); + max(sizeof(struct mlx5_wqe_raddr_seg), + sizeof(struct mlx5_wqe_umr_ctrl_seg) + + sizeof(struct mlx5_mkey_seg)); break; case IB_QPT_UD: