DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: "Eugenio Pérez" <eperezma@redhat.com>, dev@dpdk.org, yong.liu@intel.com
Cc: Maxime Coquelin <mcoqueli@redhat.com>,
	Adrian Moreno Zapata <amorenoz@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: flush shadow tx if there is no more packets
Date: Wed, 5 Feb 2020 10:47:51 +0100	[thread overview]
Message-ID: <f59eeefe-1413-03d7-497d-71225fb212f4@redhat.com> (raw)
In-Reply-To: <20200129193310.9157-1-eperezma@redhat.com>



On 2/4/20 3:47 PM, Eugenio Pérez wrote:
> The current implementation of vhost_net in packed vring tries to fill
> the shadow vector before send any actual changes to the guest. While
> this can be beneficial for the throughput, it conflicts with some
> bufferfloats methods like the linux kernel napi, that stops
> transmitting packets if there are too much bytes/buffers in the
> driver.
> 
> To solve it, we flush the shadow packets at the end of
> virtio_dev_tx_packed if we have starved the vring, i.e., the next
> buffer is not available for the device.
> 
> Since this last check can be expensive because of the atomic, we only
> check it if we have not obtained the expected (count) packets. If it
> happens to obtain "count" packets and there is no more available
> packets the caller needs to keep call virtio_dev_tx_packed again.
> 
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> ---
>  lib/librte_vhost/virtio_net.c | 27 ++++++++++++++++++++++++++-
>  1 file changed, 26 insertions(+), 1 deletion(-)

Applied to dpdk-next-virtio tree.

Thanks,
Maxime


  parent reply	other threads:[~2020-02-05  9:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09 15:47 [dpdk-dev] [Bug 383] dpdk virtio_user lack of notifications make vhost_net+napi stops tx buffers bugzilla
2020-01-09 15:55 ` eperezma
2020-01-15  7:05   ` Liu, Yong
2020-01-29 19:33 ` [dpdk-dev] [PATCH] vhost: flush shadow tx if there is no more packets Eugenio Pérez
2020-01-31 18:38   ` Kevin Traynor
2020-02-04  9:23     ` Eugenio Perez Martin
2020-02-04 13:48       ` Kevin Traynor
2020-02-04 15:05         ` Eugenio Perez Martin
2020-02-04 15:10           ` Maxime Coquelin
2020-02-05  9:09   ` Maxime Coquelin
2020-02-05  9:47   ` Maxime Coquelin [this message]
2020-02-05 15:45     ` Eugenio Perez Martin

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=f59eeefe-1413-03d7-497d-71225fb212f4@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=amorenoz@redhat.com \
    --cc=dev@dpdk.org \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mcoqueli@redhat.com \
    --cc=mst@redhat.com \
    --cc=yong.liu@intel.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).