Looks OK, applied.  One question:

>        /* Sanity check RQ size before proceeding */
> -       if (cap->max_recv_wr  > dev->dev->caps.max_wqes  ||
> -           cap->max_recv_sge > dev->dev->caps.max_rq_sg)
> +       if (cap->max_recv_wr > dev->dev->caps.max_wqes - MLX4_IB_SQ_MAX_SPARE 
> ||
> +           cap->max_recv_sge >
> +               min(dev->dev->caps.max_sq_sg, dev->dev->caps.max_rq_sg))

Why do we need to check max_recv_sge against caps.max_sq_sg as well as
caps.max_rq_sg?

> @@ -329,8 +330,19 @@ static int set_rq_size(struct mlx4_ib_dev *dev, struct 
> ib_qp_cap *cap,
>                qp->rq.wqe_shift = ilog2(qp->rq.max_gs * sizeof (struct 
> mlx4_wqe_data_seg));
>        }
>
> -       cap->max_recv_wr  = qp->rq.max_post = qp->rq.wqe_cnt;
> -       cap->max_recv_sge = qp->rq.max_gs;
> +       /* leave userspace return values as they were, so as not to break ABI 
> */
> +       if (is_user) {
> +               cap->max_recv_wr  = qp->rq.max_post = qp->rq.wqe_cnt;
> +               cap->max_recv_sge = qp->rq.max_gs;
> +       } else {
> +               cap->max_recv_wr  = qp->rq.max_post =
> +                       min(dev->dev->caps.max_wqes - MLX4_IB_SQ_MAX_SPARE, 
> qp->rq.wqe_cnt);
> +               cap->max_recv_sge = min(qp->rq.max_gs,
> +                                       min(dev->dev->caps.max_sq_sg,
> +                                       dev->dev->caps.max_rq_sg));
> +       }
> +       /* We don't support inline sends for kernel QPs (yet) */
> +

That comment looks like cut and paste detritus, I deleted it...
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to