DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Stefan Puiu <stefan.puiu@gmail.com>, dev@dpdk.org
Cc: yongwang@vmware.com, mac_leehk@yahoo.com.hk
Subject: Re: [dpdk-dev] [PATCH v4] vmxnet3: fix Rx deadlock
Date: Mon, 19 Dec 2016 10:41:40 +0000	[thread overview]
Message-ID: <8e9b361a-566c-2c25-5497-da0ee0e7c818@intel.com> (raw)
In-Reply-To: <1482140453-49649-1-git-send-email-stefan.puiu@gmail.com>

On 12/19/2016 9:40 AM, Stefan Puiu wrote:
> 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:
> http://dpdk.org/dev/patchwork/patch/6575/. I had to forward port
> it, address review comments and also reverted the allocation
> failure handling to the first version of the patch
> (http://dpdk.org/ml/archives/dev/2015-July/022079.html), 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.
> 
> Signed-off-by: Stefan Puiu <stefan.puiu@gmail.com>

Applied to dpdk-next-net/master, thanks.

  reply	other threads:[~2016-12-19 10:41 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
2016-12-19  9:40     ` [dpdk-dev] [PATCH v4] " Stefan Puiu
2016-12-19 10:41       ` Ferruh Yigit [this message]
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=8e9b361a-566c-2c25-5497-da0ee0e7c818@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=mac_leehk@yahoo.com.hk \
    --cc=stefan.puiu@gmail.com \
    --cc=yongwang@vmware.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).