[openib-general] [PATCH][RFC] uverbs SRQ implementation

Roland Dreier rolandd at cisco.com
Wed Aug 3 12:38:27 PDT 2005


    Grant> my preference is to write this as:
    Grant>	srq = cmd.is_srq ?  idr_find(&ib_uverbs_srq_idr, cmd.srq_handle) : NULL;

OK, good suggestion.  Done in my tree.

    Grant> I think it's redudant to test cmd.is_srq.  srq is NULL if
    Grant> cmd.is_srq is not set.  ie !srq should short circuit the
    Grant> rest of the test.

As Fab points out, the logic is a little more complicated since the
user may not have passed us an SRQ.  We don't want to fail if the user
didn't give us an SRQ.

    Grant> Do I need to worry about infinite (or very long) retry
    Grant> loops here?  If not, maybe add a one-liner comment
    Grant> explaining what limits the retry.

This is standard use of the idr stuff.  I don't think the code needs
to change, and the logic is common enough in the kernel that we
shouldn't need a comment in this one spot.

 - R.



More information about the general mailing list