All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Jarod Wilson <jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH libmlx5] fix err return values to match ibv_post_send expectations
Date: Mon, 8 Aug 2016 10:30:18 -0600	[thread overview]
Message-ID: <20160808163018.GA1819@obsidianresearch.com> (raw)
In-Reply-To: <20160806184823.GT6329-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Sat, Aug 06, 2016 at 02:48:23PM -0400, Jarod Wilson wrote:
> On Fri, Aug 05, 2016 at 12:01:07PM -0600, Jason Gunthorpe wrote:
> > On Fri, Aug 05, 2016 at 01:33:59PM -0400, Jarod Wilson wrote:
> > > -	return _mlx5_post_send(ibqp, wr, bad_wr);
> > > +	errno = _mlx5_post_send(ibqp, wr, bad_wr);
> > > +	return errno;
> > 
> > Why still set errno? It was wrong in the first place..
> > 
> > Likely every use of errno in this provider should be reviewed.
> 
> Wasn't sure if something else might actually consume errno elsewhere,
> since it's a global, and the other code path in that function set errno.
> Could certainly just stick with returning the _mlx5_post_send() result
> directly.

If the man page doesn't document the function destroying errno, then
it should preserve it. Do not just randomly set 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

  parent reply	other threads:[~2016-08-08 16:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05 17:33 [PATCH libmlx5] fix err return values to match ibv_post_send expectations Jarod Wilson
     [not found] ` <1470418439-59245-1-git-send-email-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-08-05 18:01   ` Jason Gunthorpe
     [not found]     ` <20160805180107.GA31674-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-08-06 18:48       ` Jarod Wilson
     [not found]         ` <20160806184823.GT6329-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-08-08 16:30           ` Jason Gunthorpe [this message]
     [not found]             ` <20160808163018.GA1819-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-08-08 16:52               ` Jarod Wilson
     [not found]                 ` <20160808165213.GA64520-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-08-08 17:33                   ` Jason Gunthorpe
     [not found]                     ` <20160808173333.GA26622-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-08-08 18:04                       ` [PATCH v2 " Jarod Wilson
     [not found]                         ` <1470679455-28911-1-git-send-email-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-08-10 11:53                           ` Yishai Hadas
     [not found]                             ` <b3afb94e-529f-38c4-6cdc-071f8ca3301b-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-08-11  4:05                               ` Jarod Wilson
     [not found]                                 ` <20160811040539.GI29760-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-08-11 10:18                                   ` Yishai Hadas

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=20160808163018.GA1819@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@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.