public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarod Wilson <jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Yishai Hadas <yishaih-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
	Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH v2 libmlx5] fix err return values to match ibv_post_send expectations
Date: Thu, 11 Aug 2016 00:05:39 -0400	[thread overview]
Message-ID: <20160811040539.GI29760@redhat.com> (raw)
In-Reply-To: <b3afb94e-529f-38c4-6cdc-071f8ca3301b-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>

On Wed, Aug 10, 2016 at 02:53:45PM +0300, Yishai Hadas wrote:
> On 8/8/2016 9:04 PM, Jarod Wilson wrote:
> >The man page for ibv_post_send says:
> >
> >   RETURN VALUE
> >
> >       ibv_post_send() returns 0 on success, or the value of errno on failure
> >       (which indicates the failure reason).
> >
> >QEMU looks for the return value, and in the ENOMEM case, waits and
> >retries, but with mlx5, it ends up dropping requests and hanging, because
> >of the unexpected -1 return instead of ENOMEM.
> >
> >The fix is simple: set err = E<whatever> instead of -1, and eliminate use
> >of errno = in _mlx5_post_send, just have mlx5_post_send return the err from
> >_mlx5_post_send instead. This fix has been confirmed to resolves the issues
> >seen with QEMU.
> >
> >While we're at it, fix the MW_DEBUG code paths to no muck with errno either.
> >
> >v2: per discussion with Jason Gunthorpe, don't set errno in mlx5_post_send
> 
> Your patch missed few other flows that should be fixed as part of
> mlx5_post_send. (e.g. set_data_inl_seg which returns -1, set_bind_wr
> which touches errno, etc).
> 
> Just fixed that with some other minor typos/changes to the commit
> log, will send it shortly as V3, left you as the Author to give you
> the credit for.
> 
> In addition,
> Both mlx5_post_recv and mlx5_post_srq_recv should be fixed in the
> same manner, prepared another patch as some candidate fix will send
> it shortly as well.
> 
> Once the new candidate patches will pass our regression testing will
> take them officially into libmlx5.

Works for me, thanks much.

-- 
Jarod Wilson
jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

--
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-11  4:05 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
     [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 [this message]
     [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=20160811040539.GI29760@redhat.com \
    --to=jarod-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=yishaih-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox