On Tue, 2007-11-13 at 14:50 -0800, Roland Dreier wrote: > > + } else if (ret) > > + *bad_wr = wr; > > Hmm... it seems a little strange to pick the first WR for no reason > when the kernel didn't point at a particular work request. Maybe it > would make more sense to set bad_wr to NULL in this case?
Well, ibv_cmd_post_send() isn't going to know if the EINVAL is due to the size of the write being different from what the kernel expects (i.e., unrelated to WRs) or if the ID of the address handle is invalid and thus it is related to the WR. Now that I look at ib_uverbs_post_send() again, it seems that this later case should set resp.bad_wr and copy out the index of the WR that had the error. But even if there is an error not related to any WR directly, it is still the first WR that is not sent. I guess NULL could be used to give slightly more information to the caller but I don't really expect most application error recovery code to make the distinction. _______________________________________________ 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
