[Openib-windows] RE: Errors handeling on Winsock direct

Fab Tillier ftillier at silverstorm.com
Fri Oct 28 08:40:09 PDT 2005


> From: Tzachi Dar [mailto:tzachid at mellanox.co.il]
> Sent: Friday, October 28, 2005 4:36 AM
> 
> Error handling is probably one of the most complicated areas in programming
> (or should I say computer science?).

It is also the area that is most overlooked.

> Generally speaking a never fail functions are very hard to design, but writing
> a program without them is impossible. On the other hand if a function might
> fail, the failure has to be reported.

How the error is reported is implementation specific.  A function does not have
to return an error value to cause the error to be reported.  Specifically,
ib_cq_comp in the WSD provider doesn't need to return an error if it handles any
errors internally.  As long as error cases are handled, the function can remain
a void function without issue.

Currently, the only errors not handled are affiliated asynchronous errors.  All
other errors that are reported through a WC are handled.  These errors are
passed up to the Winsock client through the GetLastError mechanism.  See the
check in most of the DLL entry points on the qp_error field which is used to
report previous errors.

- Fab




More information about the ofw mailing list