From: Dotan Barak <dotanba-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Devesh Sharma
<Devesh.Sharma-iH1Dq9VlAzfQT0dZR+AlfA@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: positive or negative error values from vendor library for immediate errors?
Date: Fri, 12 Dec 2014 13:56:31 +0200 [thread overview]
Message-ID: <548AD7EF.1030102@gmail.com> (raw)
In-Reply-To: <EE7902D3F51F404C82415C4803930ACD51D6475F-DWYeeINJQrxExQ8dmkPuX0M9+F4ksjoh@public.gmane.org>
Hi Devesh.
I wish that there was a header that maps the return errors to errno,
to make things much more canonical. But currently we don't have it :(
AFAIK, the guidelines is that kernel code returns negative values
and userspace code should return positive values.
Thanks
Dotan
On 08/12/2014 12:47, Devesh Sharma wrote:
> Hello list,
>
> While reviewing some the vendor library source I found that Mellanox and Pathscale user-space provider library returns positive error number if any immediate error is encountered.
> However, other vendor user-space libraries return negative error numbers.
>
> Is there any guideline on this topic. If not, what is the correct way to do this.
> Taking reference of glibc implementation, I found that it expects negative integer as return value.
>
> Any pointer/reference/guideline will be a great help.
>
> -Regards
> Devesh
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2014-12-12 11:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 10:47 positive or negative error values from vendor library for immediate errors? Devesh Sharma
[not found] ` <EE7902D3F51F404C82415C4803930ACD51D6475F-DWYeeINJQrxExQ8dmkPuX0M9+F4ksjoh@public.gmane.org>
2014-12-12 11:56 ` Dotan Barak [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=548AD7EF.1030102@gmail.com \
--to=dotanba-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=Devesh.Sharma-iH1Dq9VlAzfQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.