On Wednesday 06 June 2012 20:05, Roland Dreier wrote: > > /* 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? > Because the HCA provides separate sizes for max_recv_sge and max_send_sge, but the IB spec only allows for a single max_sg_entries value.
We therefore enforce the lower limit of the 2. -Jack -- 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