* positive or negative error values from vendor library for immediate errors?
@ 2014-12-08 10:47 Devesh Sharma
[not found] ` <EE7902D3F51F404C82415C4803930ACD51D6475F-DWYeeINJQrxExQ8dmkPuX0M9+F4ksjoh@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Devesh Sharma @ 2014-12-08 10:47 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
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
^ permalink raw reply [flat|nested] 2+ messages in thread[parent not found: <EE7902D3F51F404C82415C4803930ACD51D6475F-DWYeeINJQrxExQ8dmkPuX0M9+F4ksjoh@public.gmane.org>]
* Re: positive or negative error values from vendor library for immediate errors? [not found] ` <EE7902D3F51F404C82415C4803930ACD51D6475F-DWYeeINJQrxExQ8dmkPuX0M9+F4ksjoh@public.gmane.org> @ 2014-12-12 11:56 ` Dotan Barak 0 siblings, 0 replies; 2+ messages in thread From: Dotan Barak @ 2014-12-12 11:56 UTC (permalink / raw) To: Devesh Sharma, linux-rdma-u79uwXL29TY76Z2rM5mHXA@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 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-12 11:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox