diff mbox

[5/5] mlx5, calc_sq_size(): Make a debug message more informative

Message ID 4387aa0f-5097-d456-eee2-b480dfa5af87@sandisk.com (mailing list archive)
State Accepted
Headers show

Commit Message

Bart Van Assche Dec. 6, 2016, 1:19 a.m. UTC
Make it clear that qp->sq.wqe_cnt is not the number of WQEs.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Eli Cohen <eli@mellanox.com>
---
 drivers/infiniband/hw/mlx5/qp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Leon Romanovsky Dec. 6, 2016, 2:31 p.m. UTC | #1
On Mon, Dec 05, 2016 at 05:19:52PM -0800, Bart Van Assche wrote:
> Make it clear that qp->sq.wqe_cnt is not the number of WQEs.
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> Cc: Eli Cohen <eli@mellanox.com>

Thanks,
Acked-by: Leon Romanovsky <leonro@mellanox.com>

> ---
>  drivers/infiniband/hw/mlx5/qp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
> index b2c6c13d44ac..735b8aadb84c 100644
> --- a/drivers/infiniband/hw/mlx5/qp.c
> +++ b/drivers/infiniband/hw/mlx5/qp.c
> @@ -381,7 +381,8 @@ static int calc_sq_size(struct mlx5_ib_dev *dev, struct ib_qp_init_attr *attr,
>  	wq_size = roundup_pow_of_two(attr->cap.max_send_wr * wqe_size);
>  	qp->sq.wqe_cnt = wq_size / MLX5_SEND_WQE_BB;
>  	if (qp->sq.wqe_cnt > (1 << MLX5_CAP_GEN(dev->mdev, log_max_qp_sz))) {
> -		mlx5_ib_dbg(dev, "wqe count(%d) exceeds limits(%d)\n",
> +		mlx5_ib_dbg(dev, "send queue size (%d * %d / %d -> %d) exceeds limits(%d)\n",
> +			    attr->cap.max_send_wr, wqe_size, MLX5_SEND_WQE_BB,
>  			    qp->sq.wqe_cnt,
>  			    1 << MLX5_CAP_GEN(dev->mdev, log_max_qp_sz));
>  		return -ENOMEM;
> -- 
> 2.11.0
> 
> --
> 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
--
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
Doug Ledford Dec. 14, 2016, 6:46 p.m. UTC | #2
On 12/6/2016 9:31 AM, Leon Romanovsky wrote:
> On Mon, Dec 05, 2016 at 05:19:52PM -0800, Bart Van Assche wrote:
>> Make it clear that qp->sq.wqe_cnt is not the number of WQEs.
>>
>> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
>> Cc: Eli Cohen <eli@mellanox.com>
> 
> Thanks,
> Acked-by: Leon Romanovsky <leonro@mellanox.com>

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index b2c6c13d44ac..735b8aadb84c 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -381,7 +381,8 @@  static int calc_sq_size(struct mlx5_ib_dev *dev, struct ib_qp_init_attr *attr,
 	wq_size = roundup_pow_of_two(attr->cap.max_send_wr * wqe_size);
 	qp->sq.wqe_cnt = wq_size / MLX5_SEND_WQE_BB;
 	if (qp->sq.wqe_cnt > (1 << MLX5_CAP_GEN(dev->mdev, log_max_qp_sz))) {
-		mlx5_ib_dbg(dev, "wqe count(%d) exceeds limits(%d)\n",
+		mlx5_ib_dbg(dev, "send queue size (%d * %d / %d -> %d) exceeds limits(%d)\n",
+			    attr->cap.max_send_wr, wqe_size, MLX5_SEND_WQE_BB,
 			    qp->sq.wqe_cnt,
 			    1 << MLX5_CAP_GEN(dev->mdev, log_max_qp_sz));
 		return -ENOMEM;