Sean Hefty wrote:
chp->cq.size is the actual number of entries that can write-to by the HW. But since one must always be available to detect "full" vs "empty", we tell the ULP that the size is one less than that./* account for the status page. */ entries++;+ /* IQ needs one extra entry to differentiate full vs empty. */ + entries++; + /* * entries must be multiple of 16 for HW. */ @@ -801,7 +804,7 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, int entries, chp->rhp = rhp; chp->cq.size--; /* status page */ - chp->ibcq.cqe = chp->cq.size; + chp->ibcq.cqe = chp->cq.size - 1;Why does the status page adjust using size--, but we use size - 1 for the extra entry?
Steve. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
