Michael> Shouldnt that be:

    Michael>                 if (qp->rq.cur + nreq > qp->rq.max)

    Michael> If I want to allow rq.max WQEs - should not I be allowed
    Michael> to post that much?

The code is correct but perhaps the name "nreq" could be improved.  If
you look at the code in context:

        for (nreq = 0; wr; ++nreq, wr = wr->next) {
                if (unlikely(qp->rq.cur + nreq >= qp->rq.max)) {

you can see that nreq is a 0-based index of the work request we're
working on.  So for example, if max is 3 and cur is 1 (so we have 2
slots open in our WQ), then the test will fail when trying to post the
third work request, which is correct.

 - R.
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

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

Reply via email to