DPDK patches and discussions
 help / color / mirror / Atom feed
From: Zhihong Wang <zhihong.wang@intel.com>
To: dev@dpdk.org
Cc: Zhihong Wang <zhihong.wang@intel.com>
Subject: [dpdk-dev] [PATCH] doc: virtio pmd versions
Date: Wed, 20 Apr 2016 23:55:24 -0400	[thread overview]
Message-ID: <1461210924-104947-1-git-send-email-zhihong.wang@intel.com> (raw)

This patch explains all the versions of current virtio pmd implementation,
what's the difference, and how to choose the right version.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
---
 doc/guides/nics/virtio.rst | 57 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst
index 06ca433..43ba686 100644
--- a/doc/guides/nics/virtio.rst
+++ b/doc/guides/nics/virtio.rst
@@ -211,3 +211,60 @@ In this example, the packet reception flow path is:
 The packet transmission flow is:
 
     IXIA packet generator-> Guest VM 82599 VF port1 rx burst-> Guest VM virtio port 0 tx burst-> tap -> Linux Bridge->82599 PF-> IXIA packet generator
+
+Virtio PMD Versions
+-------------------
+
+Virtio driver has 3 versions of rx functions and 2 versions of tx functions.
+
+RX functions:
+
+*   ``virtio_recv_pkts``:
+
+    Regular version without mergeable rx buffers support
+
+*   ``virtio_recv_mergeable_pkts``:
+
+    Regular version with mergeable rx buffers support
+
+*   ``virtio_recv_pkts_vec``:
+
+    Simple version without mergeable rx buffers support, also fixes the avail ring and uses vector instructions to optimize performance
+
+TX functions:
+
+*   ``virtio_xmit_pkts``:
+
+    Regular version
+
+*   ``virtio_xmit_pkts_simple``:
+
+    Simple version fixes the avail ring to optimize performance
+
+By default, the non-vector versions are used:
+
+*   For rx: If mergeable rx buffers is disabled then ``virtio_recv_pkts`` is used; otherwise ``virtio_recv_mergeable_pkts``
+
+*   For tx: ``virtio_xmit_pkts``
+
+Setting ``txq_flags`` to ``VIRTIO_SIMPLE_FLAGS`` (0xf01) enables the simple version of virtio poll mode driver:
+
+*   For rx: ``virtio_recv_pkts_vec``
+
+*   For tx: ``virtio_xmit_pkts_simple``
+
+The simple version will only be enabled when:
+
+*   Mergeable rx buffers is disabled
+
+*   Single segment is specified
+
+*   No offload support is needed
+
+Example to use the simple version of virtio poll mode driver in testpmd:
+
+.. code-block:: console
+
+./x86_64-native-linuxapp-gcc/app/testpmd -c 0x7 -n 4
+    --  -i --txqflags=0xf01 --rxq=1 --txq=1 --nb-cores=1
+
-- 
2.5.0

             reply	other threads:[~2016-04-21 11:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21  3:55 Zhihong Wang [this message]
2016-06-09 12:35 ` Mcnamara, John
2016-06-09 12:52   ` Richardson, Bruce
2016-06-09 12:56     ` Mcnamara, John
2016-06-15  6:59       ` Wang, Zhihong
2016-06-14 23:53 ` [dpdk-dev] [PATCH v2] " Zhihong Wang
2016-06-24 16:03   ` Mcnamara, John
2016-06-29  3:27   ` Yuanhan Liu
2016-07-01  3:28 ` [dpdk-dev] [PATCH v3] doc: virtio PMD Rx/Tx callbacks Zhihong Wang
2016-07-04  2:56   ` Yuanhan Liu
2016-07-04  3:00     ` Wang, Zhihong

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=1461210924-104947-1-git-send-email-zhihong.wang@intel.com \
    --to=zhihong.wang@intel.com \
    --cc=dev@dpdk.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;
as well as URLs for NNTP newsgroup(s).