diff options
author | Roland Dreier <rolandd@cisco.com> | 2007-06-16 14:27:38 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-06-16 14:27:38 -0700 |
commit | d55f78f1b60ab6f67fbac81b9c3f1c5572cd7f08 (patch) | |
tree | dc24b3c64dc20552031c9900b0be84113dcde24f | |
parent | 722356de9e2d624929d887447088b7a0efe0b6d6 (diff) | |
download | libmlx4-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |