DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yong Wang <yongwang@vmware.com>
To: Stefan Puiu <stefan.puiu@gmail.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "mac_leehk@yahoo.com.hk" <mac_leehk@yahoo.com.hk>
Subject: Re: [dpdk-dev] [PATCH v3] vmxnet3: fix Rx deadlock
Date: Fri, 16 Dec 2016 17:47:47 +0000	[thread overview]
Message-ID: <BY2PR05MB2359814E2FBB218A00A65E45AF9C0@BY2PR05MB2359.namprd05.prod.outlook.com> (raw)
In-Reply-To: <1481902617-16050-1-git-send-email-stefan.puiu@gmail.com>

> -----Original Message-----
> From: Stefan Puiu [mailto:stefan.puiu@gmail.com]
> Sent: Friday, December 16, 2016 7:37 AM
> To: dev@dpdk.org
> Cc: Yong Wang <yongwang@vmware.com>; mac_leehk@yahoo.com.hk;
> Stefan Puiu <stefan.puiu@gmail.com>
> Subject: [PATCH v3] vmxnet3: fix Rx deadlock
> 
> Our use case is that we have an app that needs to keep mbufs around
> for a while. We've seen cases when calling vmxnet3_post_rx_bufs() from
> vmxet3_recv_pkts(), it might not succeed to add any mbufs to any RX
> descriptors (where it returns -err). Since there are no mbufs that the
> virtual hardware can use, no packets will be received after this; the
> driver won't refill the mbuf after this so it gets stuck in this
> state. I call this a deadlock for lack of a better term - the virtual
> HW waits for free mbufs, while the app waits for the hardware to
> notify it for data (by flipping the generation bit on the used Rx
> descriptors). Note that after this, the app can't recover.
> 
> This fix is a rework of this patch by Marco Lee:
> https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__dpdk.org_dev_patchwork_patch_6575_&d=DgIBAg&c=uilaK90D4TOVo
> H58JNXRgQ&r=v4BBYIqiDq552fkYnKKFBFyqvMXOR3UXSdFO2plFD1s&m=zvM
> IQvFmKNiehiMa4e9UerIU-
> XZTcnlOqJZ0FXx0lsM&s=nZk5Zsz_6yrZOCrteBQ4RJbgLMhsPxW8DQkZmzGSo
> yU&e= . I had to forward port
> it, address review comments and also reverted the allocation
> failure handling to the first version of the patch
> (https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__dpdk.org_ml_archives_dev_2015-
> 2DJuly_022079.html&d=DgIBAg&c=uilaK90D4TOVoH58JNXRgQ&r=v4BBYIqiD
> q552fkYnKKFBFyqvMXOR3UXSdFO2plFD1s&m=zvMIQvFmKNiehiMa4e9UerI
> U-XZTcnlOqJZ0FXx0lsM&s=dU2FsdH7OPHIUXeXIrv0yubdCb-
> 4_koMclojVj_5ULo&e= ), since
> that's the only approach that seems to work, and seems to be what
> other drivers are doing (I checked ixgbe and em). Reusing the mbuf
> that's getting passed to the application doesn't seem to make
> sense, and it was causing weird issues in our app. Also, reusing
> rxm without checking if it's NULL could cause the code to crash.
> ---

Signoff info is missing from the commit description.  Otherwise, looks good.

Acked-by: Yong Wang <yongwang@vmware.com>

  reply	other threads:[~2016-12-16 17:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14 10:46 [dpdk-dev] [PATCH] " Stefan Puiu
2016-11-30  4:59 ` Yong Wang
2016-12-12  8:27   ` Stefan Puiu
2016-12-12 18:17     ` Yong Wang
2016-12-12  8:21 ` [dpdk-dev] [PATCH v2] " Stefan Puiu
2016-12-16 15:36   ` [dpdk-dev] [PATCH v3] " Stefan Puiu
2016-12-16 17:47     ` Yong Wang [this message]
2016-12-19  9:40     ` [dpdk-dev] [PATCH v4] " Stefan Puiu
2016-12-19 10:41       ` Ferruh Yigit
2016-12-19 12:26         ` Ferruh Yigit

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=BY2PR05MB2359814E2FBB218A00A65E45AF9C0@BY2PR05MB2359.namprd05.prod.outlook.com \
    --to=yongwang@vmware.com \
    --cc=dev@dpdk.org \
    --cc=mac_leehk@yahoo.com.hk \
    --cc=stefan.puiu@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).