aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2007-06-16 14:27:38 -0700
committerRoland Dreier <rolandd@cisco.com>2007-06-16 14:27:38 -0700
commitd55f78f1b60ab6f67fbac81b9c3f1c5572cd7f08 (patch)
treedc24b3c64dc20552031c9900b0be84113dcde24f
parent722356de9e2d624929d887447088b7a0efe0b6d6 (diff)
downloadlibmlx4-d55f78f1b60ab6f67fbac81b9c3f1c5572cd7f08.tar.gz
Fix returned max_inline_data QP cap
Set the value of max_inline_data that is returned in the QP caps from mlx4_create_qp() after we calculate the real value, rather than just returning whatever uninitialized junk is in qp->max_inline_data before it is set. Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--src/qp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qp.c b/src/qp.c
index 0d53623..8f4bc0f 100644
--- a/src/qp.c
+++ b/src/qp.c
@@ -583,7 +583,6 @@ void mlx4_set_sq_sizes(struct mlx4_qp *qp, struct ibv_qp_cap *cap,
qp->sq.max_gs = wqe_size / sizeof (struct mlx4_wqe_data_seg);
cap->max_send_sge = qp->sq.max_gs;
- cap->max_inline_data = qp->max_inline_data;
qp->sq.max_post = qp->sq.wqe_cnt - qp->sq_spare_wqes;
cap->max_send_wr = qp->sq.max_post;
@@ -596,6 +595,7 @@ void mlx4_set_sq_sizes(struct mlx4_qp *qp, struct ibv_qp_cap *cap,
qp->max_inline_data = wqe_size -
sizeof (struct mlx4_wqe_inline_seg) *
(align(wqe_size, MLX4_INLINE_ALIGN) / MLX4_INLINE_ALIGN);
+ cap->max_inline_data = qp->max_inline_data;
}
struct mlx4_qp *mlx4_find_qp(struct mlx4_context *ctx, uint32_t qpn)