>> -     qp->sq.max_gs = ((qp->sq_max_wqes_per_wr << qp->sq.wqe_shift) -
>> +     qp->sq.max_gs = (min(dev->dev->caps.max_sq_desc_sz,
>> +                          (qp->sq_max_wqes_per_wr << qp->sq.wqe_shift)) -
>>                        send_wqe_overhead(type, qp->flags)) /
>>               sizeof (struct mlx4_wqe_data_seg);
>
> In this case, sq.max_gs ( = (1008 - wqe overhead) / 16) will be larger than 
> the
> "max sge" value returned by ib_query_device, (max_sge returned by 
> ib_query_device is 32).
> I'm not crazy about this inconsistency.  Please note also that the IB Spec 
> does not
> differentiate between Send max_sge, and Receive max_sge, so we're reduced to 
> enforcing
> the minimum of the two values.

OK, we can clamp the value lower here to the max_sge reported by the
driver (but the change
I'm making here already only lowers the returned sq.max_gs value,
since the value

    qp->sq_max_wqes_per_wr << qp->sq.wqe_shift

will be 1024 in the case in question).

But can you point me to the place in the IB spec where it requires all
sge limits to be no bigger
than the returned max_sge value?

 - R.
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to