From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
Cc: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH/libmlx4] Return ERRNO codes from ibv_post_send/recv instead of -1
Date: Wed, 9 Mar 2011 10:00:29 -0700 [thread overview]
Message-ID: <20110309170029.GA15419@obsidianresearch.com> (raw)
In-Reply-To: <AANLkTikfGw=ORf=B9x0Z8rrfnxOV=j0ynaSvRZ6j1sVt-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Wed, Mar 09, 2011 at 05:04:30PM +0100, Bart Van Assche wrote:
> On Wed, Mar 9, 2011 at 2:28 AM, Jason Gunthorpe
> <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote:
> > - ? ? ? ? ? ? ? ? ? ? ? ret = -1;
> > + ? ? ? ? ? ? ? ? ? ? ? ret = ENOMEM;
>
> I'm afraid that this will break any code that tests return values with
> the test "< 0". Introducing error codes is good, but why to change
> negative return codes into positive ?
Any code that checks for < 0 is already broken. This is just the mlx4
userspace driver, other drivers correctly return positive errno, eg
any driver that uses the ibv_cmd_post_send path returns positive
errno.
The standard convention for ibverbs, clearly stated in the manual
is that 0 is success and everything else is errno.
Jason
--
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:[~2011-03-09 17:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-09 1:28 [PATCH/libmlx4] Return ERRNO codes from ibv_post_send/recv instead of -1 Jason Gunthorpe
[not found] ` <20110309012810.GM22729-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-03-09 14:02 ` Mike Heinz
2011-03-09 16:04 ` Bart Van Assche
[not found] ` <AANLkTikfGw=ORf=B9x0Z8rrfnxOV=j0ynaSvRZ6j1sVt-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-09 17:00 ` Jason Gunthorpe [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=20110309170029.GA15419@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=bvanassche-HInyCGIudOg@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox