[openib-general] Different low level drivers returns different return values incase of an error
Dotan Barak
dotanb at dev.mellanox.co.il
Mon Dec 18 07:52:09 PST 2006
Bryan O'Sullivan wrote:
> Dotan Barak wrote:
>
>> I think that there should be 2 modes to the drivers:
>> mode 1 (release mode): return "standard" errno values
>> mode 2 (debug mode) : return "IB oriented" values
>
> No way, that's a guaranteed route to broken code. If you want to
> propagate IB-specific error values, define an ib_errno variable, make
> it use the same TLS mechanism as errno, give it well-defined values,
> and make it part of the ABI. Some mechanism that you can't rely on
> unless you know you need to tweak it is worse than useless.
>
> <b
This was an example for a possible solution on how to give the user more
info when there is a failure
(I'm sure that we can come out with a better solution that will be
accepted by everyone ..)
Dotan
More information about the general
mailing list