[openib-general] Different low level drivers returns different return values incase of an error
Hoang-Nam Nguyen
HNGUYEN at de.ibm.com
Mon Dec 18 01:22:29 PST 2006
Hi Dotan!
> I noticed that low level drivers from different vendors don't act the
> same when there is an error.
> For example:
> when ibv_post_send fails, libmthca returns -1
> when ibv_post_send fails, libehca returns -(errno value), such as:
> -EINVAL, -ENOMEM
> (i didn't check the code of ipath)
>
> I wrote the man pages to the libibverbs (that i hope, soon will be
> committed), and tried to describe the
> return values of the verbs.
>
> I don't think that the description(behavior) of the verb need to be
> according to the HW which is being used ..
>
> If we are going to change to change the return values to a common
> behavior i suggest to use a way
> which will give more information to the user that uses the verbs (create
> IB oriented errno values(?)), or
> another method which will give the user a hint of the problem. for
> example: when the user try to modify a QP
> with a bad value there is an EINVAL return value for all of the values
> that he tries to modify ...
>
> What do you think?
Good point. I can speak for ehca only. We prefer to reuse existing
errno values and not to define new ones as it's also a question of
how much information we want to tell the consumer in case of error
and what it can handle for. To me the defined errno values give
enough information to caller. Anyway we should use same error
codes for both kernel and user space verbs.
Regards
Nam
More information about the general
mailing list