diff mbox series

[ovs-dev,v2,2/4] doc: Add info on vhost tx retries.

Message ID 20190625145724.3058-3-ktraynor@redhat.com
State Superseded
Headers show
Series vhost tx retry updates | expand

Commit Message

Kevin Traynor June 25, 2019, 2:57 p.m. UTC
Add documentation about vhost tx retries and external
configuration that can help reduce/avoid them.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
---
 Documentation/topics/dpdk/vhost-user.rst | 36 ++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

Comments

0-day Robot June 26, 2019, 8:41 a.m. UTC | #1
Bleep bloop.  Greetings Kevin Traynor, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Line is 81 characters long (recommended limit is 79)
#48 FILE: Documentation/topics/dpdk/vhost-user.rst:103:
      <address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/>

Lines checked: 64, Warnings: 1, Errors: 0


Please check this out.  If you feel there has been an error, please email aconole@bytheb.org

Thanks,
0-day Robot
Li,Rongqing via dev June 26, 2019, 2:05 p.m. UTC | #2
On Tue, Jun 25, 2019 at 03:57:22PM +0100, Kevin Traynor wrote:
> Add documentation about vhost tx retries and external
> configuration that can help reduce/avoid them.
> 
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> Acked-by: Eelco Chaudron <echaudro@redhat.com>
> ---

This also has a magic number without a define, but since the
max number of retries is exposed to the users in the next patches
as a parameter in the documentation it seems fine to me.

Otherwise the patch looks good to me.

Acked-by: Flavio Leitner <fbl@sysclose.org>
Li,Rongqing via dev June 26, 2019, 2:27 p.m. UTC | #3
On Wed, Jun 26, 2019 at 11:05:42AM -0300, Flavio Leitner via dev wrote:
> On Tue, Jun 25, 2019 at 03:57:22PM +0100, Kevin Traynor wrote:
> > Add documentation about vhost tx retries and external
> > configuration that can help reduce/avoid them.
> > 
> > Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> > Acked-by: Eelco Chaudron <echaudro@redhat.com>
> > ---
> 
> This also has a magic number without a define, but since the
> max number of retries is exposed to the users in the next patches
> as a parameter in the documentation it seems fine to me.
> 
> Otherwise the patch looks good to me.

Actually it mentions NETDEV_MAX_BATCH where it is NETDEV_MAX_BURST
as defined in lib/dp-packet.h

fbl
Kevin Traynor June 26, 2019, 3:04 p.m. UTC | #4
On 26/06/2019 15:27, Flavio Leitner wrote:
> On Wed, Jun 26, 2019 at 11:05:42AM -0300, Flavio Leitner via dev wrote:
>> On Tue, Jun 25, 2019 at 03:57:22PM +0100, Kevin Traynor wrote:
>>> Add documentation about vhost tx retries and external
>>> configuration that can help reduce/avoid them.
>>>
>>> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
>>> Acked-by: Eelco Chaudron <echaudro@redhat.com>
>>> ---
>>
>> This also has a magic number without a define, but since the
>> max number of retries is exposed to the users in the next patches
>> as a parameter in the documentation it seems fine to me.
>>
>> Otherwise the patch looks good to me.
> 
> Actually it mentions NETDEV_MAX_BATCH where it is NETDEV_MAX_BURST
> as defined in lib/dp-packet.h
> 

D'oh :/ thanks for spotting it.

> fbl
>
diff mbox series

Patch

diff --git a/Documentation/topics/dpdk/vhost-user.rst b/Documentation/topics/dpdk/vhost-user.rst
index f7b4b338e..0f426c14c 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -76,4 +76,40 @@  mode ports require QEMU version 2.7.  Ports of type vhost-user are currently
 deprecated and will be removed in a future release.
 
+vhost tx retries
+~~~~~~~~~~~~~~~~
+
+When sending a batch of packets to a vhost-user or vhost-user-client interface,
+it may happen that some but not all of the packets in the batch are able to be
+sent to the guest. This is often because there is not enough free descriptors
+in the virtqueue for all the packets in the batch to be sent. In this case
+there will be a retry, with a default maximum of 8 occurring. If at any time no
+packets can be sent, it may mean the guest is not accepting packets, so there
+are no (more) retries.
+
+.. note::
+
+  Maximum vhost tx batch size is defined by NETDEV_MAX_BATCH and is
+  currently 32.
+
+Tx Retries may be reduced or even avoided by some external configuration, such
+as increasing the virtqueue size through the ``rx_queue_size`` parameter
+introduced in QEMU 2.7.0 / libvirt 2.3.0::
+
+  <interface type='vhostuser'>
+      <mac address='56:48:4f:53:54:01'/>
+      <source type='unix' path='/tmp/dpdkvhostclient0' mode='server'/>
+      <model type='virtio'/>
+      <driver name='vhost' rx_queue_size='1024' tx_queue_size='1024'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/>
+  </interface>
+
+The guest application will also need need to provide enough descriptors. For
+example with ``testpmd`` the command line argument can be used::
+
+ --rxd=1024 --txd=1024
+
+The guest should also have sufficient cores dedicated for consuming and
+processing packets at the required rate.
+
 .. _dpdk-vhost-user: