Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54e95f8d authored by Roland Dreier's avatar Roland Dreier
Browse files

IB/mlx4: Get rid of max_inline_data calculation



The calculation of max_inline_data in set_kernel_sq_size() is bogus,
since it doesn't take into account the fact that inline segments may
not cross a 64-byte boundary, and hence multiple inline segments will
probably need to be used to post large inline sends.

We don't support inline sends for kernel QPs anyway, so there's no
point in doing this calculation anyway, since the field is just zeroed
out a little later.  So just delete the bogus calculation.

Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 0e6e7416
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -277,8 +277,8 @@ static int set_kernel_sq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap,

	cap->max_send_wr  = qp->sq.max_post = qp->sq.wqe_cnt - qp->sq_spare_wqes;
	cap->max_send_sge = qp->sq.max_gs;
	cap->max_inline_data = (1 << qp->sq.wqe_shift) - send_wqe_overhead(type) -
		sizeof (struct mlx4_wqe_inline_seg);
	/* We don't support inline sends for kernel QPs (yet) */
	cap->max_inline_data = 0;

	return 0;
}
@@ -390,9 +390,6 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd,
			err = -ENOMEM;
			goto err_wrid;
		}

		/* We don't support inline sends for kernel QPs (yet) */
		init_attr->cap.max_inline_data = 0;
	}

	err = mlx4_qp_alloc(dev->dev, sqpn, &qp->mqp);