DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Gavin Hu (Arm Technology China)" <Gavin.Hu@arm.com>
To: Yinan <yinan.wang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>,
	"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"tiwei.bie@intel.com" <tiwei.bie@intel.com>
Cc: "zhihong.wang@intel.com" <zhihong.wang@intel.com>,
	"john.mcnamara@intel.com" <john.mcnamara@intel.com>,
	"marko.kovacevic@intel.com" <marko.kovacevic@intel.com>,
	nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH] doc: clarify virtio PMD path selection
Date: Mon, 18 Nov 2019 09:55:40 +0000	[thread overview]
Message-ID: <VI1PR08MB5376728BE4D8DC2F1F0873648F4D0@VI1PR08MB5376.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20191118102923.9302-1-yinan.wang@intel.com>

Hi Yinan,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Yinan
> Sent: Monday, November 18, 2019 6:29 PM
> To: dev@dpdk.org; maxime.coquelin@redhat.com; tiwei.bie@intel.com
> Cc: zhihong.wang@intel.com; john.mcnamara@intel.com;
> marko.kovacevic@intel.com; Yinan Wang <yinan.wang@intel.com>
> Subject: [dpdk-dev] [PATCH] doc: clarify virtio PMD path selection
> 
> From: Yinan Wang <yinan.wang@intel.com>
> 
> add virtio paths selection and usage introduction for better
> virtio usability.
> 
> Signed-off-by: Yinan Wang <yinan.wang@intel.com>
> ---
>  .../virtio_paths_selection_and_usage.rst      | 130 ++++++++++++++++++
>  1 file changed, 130 insertions(+)
>  create mode 100644 doc/guides/howto/virtio_paths_selection_and_usage.rst
> 
> diff --git a/doc/guides/howto/virtio_paths_selection_and_usage.rst
> b/doc/guides/howto/virtio_paths_selection_and_usage.rst
> new file mode 100644
> index 000000000..b5918eaf9
> --- /dev/null
> +++ b/doc/guides/howto/virtio_paths_selection_and_usage.rst
> @@ -0,0 +1,130 @@
> +..  SPDX-License-Identifier: BSD-3-Clause
> +    Copyright(c) 2019 Intel Corporation.
> +
> +Virtio paths Selection and Usage
> +================================
> +
> +Logically virtio-PMD has 9 paths based on the virtio features (Rx
> mergeable,In-order,Packed virtqueue)
> +combinations, below are introduction of virtio three common features:
s/are/is an
> +
> +*   Rx mergeable: With this feature negotiated, device can receive larger
> packets by combining
> +    individual descriptors.
> +*   In-order: Some devices always use descriptors in the same order in which
> they have been made
> +    available, these devices can offer the VIRTIO_F_IN_ORDER feature. If this
> feature negotiated,
> +    driver will use descriptors in order. Meanwhile, this knowledge allows
> device operate used ring
> +    in batches and driver operate available ring in batches and such can
> decrease cache miss rate.
> +*   Packed virtqueue: The structure of packed virtqueue is different from split
> virtqueue,split
> +    virtqueue is composed of available ring, used ring and descriptor table,
> while packed virtqueue
> +    is composed of descriptor ring,driver event suppression and device event
> suppression. The idea
> +    behind this is to improve performance by avoiding cache misses and and
> make it easier for devices
> +    to implement.
> +
> +Virtio paths Selection
> +----------------------
> +
> +If packed virtqueue is not negotiated, below split virtqueue paths can be
> selected
> +according to below configuration:
> +
> +#. Split virtqueue mergeable path: If Rx mergeable is negotiated, in-order
> feature is
> +   not negotiated, this path will be selected.
> +#. Split virtqueue non-mergeable path: If Rx mergeable and in-order feature
> are not
> +   negotiated, also Rx offload(s) are requested, this path can be selected.
> +#. Split virtqueue in-order mergeable path: If in-order feature and Rx
> mergeable are
> +   both negotiated, this path can be selected.
> +#. Split virtqueue in-order non-mergeable path: If in-order feature is
> negotiated and
> +   Rx mergeable is not negotiated, this path can be selected.
> +#. Split virtqueue vectorized RX path: If Rx mergeable is disabled and no Rx
> offload
> +   requested, this path can be selected.
> +
> +If packed virtqueue is negotiated, below packed virtqueue paths can be
> selected
> +according to below configuration:
> +
> +#. Packed virtqueue mergeable path: If Rx mergeable is negotiated, in-order
> feature
> +   is not negotiated, this path will be selected.
> +#. Packed virtqueue non-mergeable path: If Rx mergeable and in-order
> feature are not
> +   negotiated, also Rx offload(s) are requested, this path will be selected.
> +#. Packed virtqueue in-order mergeable path: If in-order feature and Rx
> mergeable are
> +   both negotiated, this path will be selected.
> +#. Packed virtqueue in-order non-mergeable path: If in-order feature is
> negotiated and
> +   Rx mergeable is not negotiated, this path will be selected.
> +
> +Rx/Tx callbacks of each Virtio path
> +-----------------------------------
> +
> +Refer to above descriptions,virtio path and Rx/TX callbacks are auto selected
> by different parameters of
> +vdev and workloads. Rx callbacks and Tx callbacks name for each Virtio Path
> are shown in following tables::
> +
> +   +-----------------------------------------------------------------------------------------------
> -----------+
> +   |       Virtio path                          |   Rx callbacks                   |    TX callbacks          |
> +   +-----------------------------------------------------------------------------------------------
> -----------+
> +   |Split virtqueue mergeable path              |virtio_recv_mergeable_pkts        |
> virtio_xmit_pkts         |
> +   +-----------------------------------------------------------------------------------------------
> -----------+
> +   |Split virtqueue non-mergeable path          | virtio_recv_pkts                 |
> virtio_xmit_pkts        |
> +   +-----------------------------------------------------------------------------------------------
> -----------+
> +   |Split virtqueue in-order mergeable path     | virtio_recv_pkts_inorder         |
> virtio_xmit_pkts_inorder|
> +   +-----------------------------------------------------------------------------------------------
> -----------+
> +   |Split virtqueue in-order non-mergeable path | virtio_recv_pkts_inorder
> |  virtio_xmit_pkts_inorder|
> +   +-----------------------------------------------------------------------------------------------
> -----------+
> +   |Split virtqueue vectorized RX path          | virtio_recv_pkts_vec             |
> virtio_xmit_pkts        |
> +   +-----------------------------------------------------------------------------------------------
> -----------+
> +   |Packed virtqueue mergeable path             |
> virtio_recv_mergeable_pkts_packed|  virtio_xmit_pkts_packed |
> +   +-----------------------------------------------------------------------------------------------
> -----------+
> +   |Packed virtqueue normal path                | virtio_recv_pkts_packed          |
> virtio_xmit_pkts_packed |
> +   +-----------------------------------------------------------------------------------------------
> -----------+
> +   |Packed virtqueue in-order mergeable path    |
> virtio_recv_mergeable_pkts_packed|  virtio_xmit_pkts_packed |
> +   +-----------------------------------------------------------------------------------------------
> -----------+
> +   |Packed virtqueue in-order normal path       | virtio_recv_pkts_packed
> |  virtio_xmit_pkts_packed |
> +   +-----------------------------------------------------------------------------------------------
> -----------+
> +
> +Virtio paths Support Status from Release to Release
> +---------------------------------------------------
> +
> +Virtio feature implementation:
> +
> +*   In-order feature implemented in DPDK 18.08 by adding new Rx/TX
> callbacks
> +    ``virtio_recv_pkts_inorder`` and ``virtio_xmit_pkts_inorder``.
> +*   Packed virtqueue implemented in DPDK 19.02 by adding new Rx/TX
> callbacks
> +    ``virtio_recv_pkts_packed`` , ``virtio_recv_mergeable_pkts_packed`` and
> ``virtio_xmit_pkts_packed``.
> +
> +Virtio path number changes from release to release, all virtio paths support
> status are shown in below table::
> +
> +   +-----------------------------------------------------------------------------------------------
> ---------------------------------------------------------+
> +   |Virtio path\ DPDK version                   | v16.11 | v17.02 | v17.05 | v17.08 |
> v17.11 | v18.02 | v18.05 | v18.08 | v18.11 | v19.02 | v19.05 | v19.08 |
> +   +-----------------------------------------------------------------------------------------------
> ---------------------------------------------------------+
> +   |Split virtqueue mergebale path              |   Y    |   Y    |    Y    |   Y   |   Y    |   Y
> |   Y    |   Y    |   Y    |  Y     |   Y    |   Y    |
> +   +-----------------------------------------------------------------------------------------------
> ---------------------------------------------------------+
> +   |Split virtqueue non-mergeable path          |   Y    |   Y    |    Y    |   Y   |   Y    |   Y
> |   Y    |   Y    |   Y    |  Y     |   Y    |   Y    |
> +   +-----------------------------------------------------------------------------------------------
> ---------------------------------------------------------+
> +   |Split virtqueue vectorized RX path          |   Y    |   Y    |    Y    |   Y   |   Y    |   Y
> |   Y    |   Y    |   Y    |  Y     |   Y    |   Y    |
> +   -------------------------------------------------------------------------------------------------
> --------------------------------------------------------+
> +   |Split virtqueue simple TX path              |   Y    |   Y    |    Y    |   Y   |   Y    |   Y    |
> Y    |   N    |   N    |  N     |   N    |   N    |
> +   -------------------------------------------------------------------------------------------------
> --------------------------------------------------------+
> +   |Split virtqueue in-order non-mergeable path |        |        |         |       |        |
> |        |   Y    |   Y    |  Y     |   Y    |   Y    |
> +   -------------------------------------------------------------------------------------------------
> --------------------------------------------------------+
> +   |Split virtqueue in-order mergeable path     |        |        |         |       |        |
> |        |   Y    |   Y    |  Y     |   Y    |   Y    |
> +   -------------------------------------------------------------------------------------------------
> --------------------------------------------------------+
> +   |Packed virtqueue mergeable path             |        |        |         |       |        |        |
> |        |        |  Y     |   Y    |   Y    |
> +   -------------------------------------------------------------------------------------------------
> --------------------------------------------------------+
> +   |Packed virtqueue non-mergeable path         |        |        |         |       |        |
> |        |        |        |  Y     |   Y    |   Y    |
> +   -------------------------------------------------------------------------------------------------
> --------------------------------------------------------+
> +   |Packed virtqueue in-order mergeable path    |        |        |         |       |        |
> |        |        |        |  Y     |   Y    |   Y    |
> +   -------------------------------------------------------------------------------------------------
> --------------------------------------------------------+
> +   |Packed virtqueue in-order non-mergeable path|        |        |         |       |
> |        |        |        |        |  Y     |   Y    |   Y    |
> +   -------------------------------------------------------------------------------------------------
> --------------------------------------------------------+
> +
> +QEMU Support Status
> +-------------------
It is better to add Qemu version latest, the future Qemu version may support more.
> +
> +Qemu only support three path of Virtio-PMD: Split virtqueue mergebale path,
Add "s" to the first path.
> +Split virtqueue no-mergeable path,Split virtqueue vectorized RX path.
> +
> +How to Debug
> +------------
> +
> +If you meet performance drop or some other issues after upgrading the driver
> +or configuration, below steps can help you identify which path you selected
> and
> +root cause faster.
> +
> +#. Run vhost/virtio test case;
> +#. Run "perf top" and check virtio Rx/tx callback names;
> +#. Identify which virtio path is selected refer to above table.
> --
> 2.17.1

Other than the minor comments, 
Reviewed-by: Gavin Hu <gavin.hu@arm.com>


  parent reply	other threads:[~2019-11-18  9:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18 10:29 Yinan
2019-11-18  2:23 ` Stephen Hemminger
2019-11-25 15:49   ` Wang, Yinan
2019-11-18  9:55 ` Gavin Hu (Arm Technology China) [this message]
2019-11-26 16:08 ` [dpdk-dev] [PATCH v4] " Yinan
2019-11-27  2:43   ` Tiwei Bie
2019-11-26 21:30 ` [dpdk-dev] [PATCH] " Thomas Monjalon
2019-11-27 15:19 ` [dpdk-dev] [PATCH v5] " Yinan
2019-11-27  6:38   ` Tiwei Bie
2019-11-27  8:41   ` Maxime Coquelin
2019-11-28  0:14   ` Thomas Monjalon
2019-11-28 14:30   ` [dpdk-dev] [PATCH v6] " Maxime Coquelin
2019-11-28 18:17     ` Thomas Monjalon

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=VI1PR08MB5376728BE4D8DC2F1F0873648F4D0@VI1PR08MB5376.eurprd08.prod.outlook.com \
    --to=gavin.hu@arm.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=nd@arm.com \
    --cc=tiwei.bie@intel.com \
    --cc=yinan.wang@intel.com \
    --cc=zhihong.wang@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).