DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
* [dpdk-dev] [PATCH 0/6] Some updates for virtio guide
@ 2019-08-13  2:07 Tiwei Bie
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 1/6] net/virtio: remove remaining simple Tx related stuff Tiwei Bie
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Tiwei Bie @ 2019-08-13  2:07 UTC (permalink / raw)
  To: maxime.coquelin, zhihong.wang, john.mcnamara, marko.kovacevic, dev

Tiwei Bie (6):
  net/virtio: remove remaining simple Tx related stuff
  doc: fix typo in virtio in-order Rx function name
  doc: update the description for in-order Rx path
  doc: document the devargs for virtio-user
  doc: document packed virtqueue for virtio
  doc: fix format for virtio guide

 doc/guides/nics/virtio.rst         | 118 ++++++++++++++++++++---------
 drivers/net/virtio/virtio_ethdev.h |   3 -
 2 files changed, 84 insertions(+), 37 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 1/6] net/virtio: remove remaining simple Tx related stuff
  2019-08-13  2:07 [dpdk-dev] [PATCH 0/6] Some updates for virtio guide Tiwei Bie
@ 2019-08-13  2:07 ` Tiwei Bie
  2019-09-06 13:15   ` Maxime Coquelin
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 2/6] doc: fix typo in virtio in-order Rx function name Tiwei Bie
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Tiwei Bie @ 2019-08-13  2:07 UTC (permalink / raw)
  To: maxime.coquelin, zhihong.wang, john.mcnamara, marko.kovacevic, dev; +Cc: stable

The simple Tx path in virtio has been removed in below commit.
This patch removes an undefined function declaration of simple
Tx and all related descriptions in the doc.

Fixes: 57f818963d80 ("net/virtio: remove simple Tx path")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
 doc/guides/nics/virtio.rst         | 15 ++-------------
 drivers/net/virtio/virtio_ethdev.h |  3 ---
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst
index 2ae875cb4..da9cd6ba6 100644
--- a/doc/guides/nics/virtio.rst
+++ b/doc/guides/nics/virtio.rst
@@ -201,7 +201,7 @@ The packet transmission flow is:
 Virtio PMD Rx/Tx Callbacks
 --------------------------
 
-Virtio driver has 4 Rx callbacks and 3 Tx callbacks.
+Virtio driver has 4 Rx callbacks and 2 Tx callbacks.
 
 Rx callbacks:
 
@@ -223,9 +223,6 @@ Tx callbacks:
 #. ``virtio_xmit_pkts``:
    Regular version.
 
-#. ``virtio_xmit_pkts_simple``:
-   Vector version fixes the available ring indexes to optimize performance.
-
 #. ``virtio_xmit_pkts_inorder``:
    In-order version.
 
@@ -239,25 +236,17 @@ By default, the non-vector callbacks are used:
 
 Vector callbacks will be used when:
 
-*   ``txmode.offloads`` is set to ``0x0``, which implies:
-
-    *   Single segment is specified.
-
-    *   No offload support is needed.
-
 *   Mergeable Rx buffers is disabled.
 
 The corresponding callbacks are:
 
 *   For Rx: ``virtio_recv_pkts_vec``.
 
-*   For Tx: ``virtio_xmit_pkts_simple``.
-
 
 Example of using the vector version of the virtio poll mode driver in
 ``testpmd``::
 
-   testpmd -l 0-2 -n 4 -- -i --tx-offloads=0x0 --rxq=1 --txq=1 --nb-cores=1
+   testpmd -l 0-2 -n 4 -- -i --rxq=1 --txq=1 --nb-cores=1
 
 In-order callbacks only work on simulated virtio user vdev.
 
diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h
index 20d331795..a10111758 100644
--- a/drivers/net/virtio/virtio_ethdev.h
+++ b/drivers/net/virtio/virtio_ethdev.h
@@ -103,9 +103,6 @@ uint16_t virtio_xmit_pkts_inorder(void *tx_queue, struct rte_mbuf **tx_pkts,
 uint16_t virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		uint16_t nb_pkts);
 
-uint16_t virtio_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts,
-		uint16_t nb_pkts);
-
 int eth_virtio_dev_init(struct rte_eth_dev *eth_dev);
 
 void virtio_interrupt_handler(void *param);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 2/6] doc: fix typo in virtio in-order Rx function name
  2019-08-13  2:07 [dpdk-dev] [PATCH 0/6] Some updates for virtio guide Tiwei Bie
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 1/6] net/virtio: remove remaining simple Tx related stuff Tiwei Bie
@ 2019-08-13  2:07 ` Tiwei Bie
  2019-09-06 13:16   ` Maxime Coquelin
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 3/6] doc: update the description for in-order Rx path Tiwei Bie
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Tiwei Bie @ 2019-08-13  2:07 UTC (permalink / raw)
  To: maxime.coquelin, zhihong.wang, john.mcnamara, marko.kovacevic, dev; +Cc: stable

The Rx function that will be used when in-order is enabled
should be virtio_recv_mergeable_pkts_inorder() instead of
virtio_xmit_pkts_inorder().

Fixes: 8f3bd7e8702d ("net/virtio: add in-order Rx/Tx into selection")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
 doc/guides/nics/virtio.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst
index da9cd6ba6..08438d064 100644
--- a/doc/guides/nics/virtio.rst
+++ b/doc/guides/nics/virtio.rst
@@ -251,7 +251,7 @@ Example of using the vector version of the virtio poll mode driver in
 In-order callbacks only work on simulated virtio user vdev.
 
 *   For Rx: If mergeable Rx buffers is enabled and in-order is enabled then
-    ``virtio_xmit_pkts_inorder`` is used.
+    ``virtio_recv_mergeable_pkts_inorder`` is used.
 
 *   For Tx: If in-order is enabled then ``virtio_xmit_pkts_inorder`` is used.
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 3/6] doc: update the description for in-order Rx path
  2019-08-13  2:07 [dpdk-dev] [PATCH 0/6] Some updates for virtio guide Tiwei Bie
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 1/6] net/virtio: remove remaining simple Tx related stuff Tiwei Bie
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 2/6] doc: fix typo in virtio in-order Rx function name Tiwei Bie
@ 2019-08-13  2:07 ` Tiwei Bie
  2019-09-06 13:18   ` Maxime Coquelin
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 4/6] doc: document the devargs for virtio-user Tiwei Bie
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Tiwei Bie @ 2019-08-13  2:07 UTC (permalink / raw)
  To: maxime.coquelin, zhihong.wang, john.mcnamara, marko.kovacevic, dev; +Cc: stable

The virtio_recv_mergeable_pkts_inorder() has been renamed to
virtio_recv_pkts_inorder() and added the non-mergeable support
in below commit.

Fixes: efcda13648d2 ("net/virtio: add non-mergeable support to in-order path")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
 doc/guides/nics/virtio.rst | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst
index 08438d064..b3c356856 100644
--- a/doc/guides/nics/virtio.rst
+++ b/doc/guides/nics/virtio.rst
@@ -215,8 +215,8 @@ Rx callbacks:
    Vector version without mergeable Rx buffer support, also fixes the available
    ring indexes and uses vector instructions to optimize performance.
 
-#. ``virtio_recv_mergeable_pkts_inorder``:
-   In-order version with mergeable Rx buffer support.
+#. ``virtio_recv_pkts_inorder``:
+   In-order version with mergeable and non-mergeable Rx buffer support.
 
 Tx callbacks:
 
@@ -250,8 +250,7 @@ Example of using the vector version of the virtio poll mode driver in
 
 In-order callbacks only work on simulated virtio user vdev.
 
-*   For Rx: If mergeable Rx buffers is enabled and in-order is enabled then
-    ``virtio_recv_mergeable_pkts_inorder`` is used.
+*   For Rx: If in-order is enabled then ``virtio_recv_pkts_inorder`` is used.
 
 *   For Tx: If in-order is enabled then ``virtio_xmit_pkts_inorder`` is used.
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 4/6] doc: document the devargs for virtio-user
  2019-08-13  2:07 [dpdk-dev] [PATCH 0/6] Some updates for virtio guide Tiwei Bie
                   ` (2 preceding siblings ...)
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 3/6] doc: update the description for in-order Rx path Tiwei Bie
@ 2019-08-13  2:07 ` Tiwei Bie
  2019-09-06 13:20   ` Maxime Coquelin
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 5/6] doc: document packed virtqueue for virtio Tiwei Bie
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Tiwei Bie @ 2019-08-13  2:07 UTC (permalink / raw)
  To: maxime.coquelin, zhihong.wang, john.mcnamara, marko.kovacevic, dev

Document the devargs for virtio-user and also make it clear
that these devargs are only available in virtio-user, i.e. not
supported by the PCI virtio driver.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
 doc/guides/nics/virtio.rst | 38 +++++++++++++++++++++++++++++++++++---
 1 file changed, 35 insertions(+), 3 deletions(-)

diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst
index b3c356856..993e691f5 100644
--- a/doc/guides/nics/virtio.rst
+++ b/doc/guides/nics/virtio.rst
@@ -322,7 +322,7 @@ Here we use l3fwd-power as an example to show how to get started.
 Virtio PMD arguments
 --------------------
 
-The user can specify below argument in devargs.
+Below devargs are supported by the PCI virtio driver:
 
 #.  ``vdpa``:
 
@@ -331,12 +331,44 @@ The user can specify below argument in devargs.
     a virtio device needs to work in vDPA mode.
     (Default: 0 (disabled))
 
-#. ``mrg_rxbuf``:
+Below devargs are supported by the virtio-user vdev:
+
+#.  ``path``:
+
+    It is used to specify a path to connect to vhost backend.
+
+#.  ``mac``:
+
+    It is used to specify the MAC address.
+
+#.  ``cq``:
+
+    It is used to enable the control queue. (Default: 0 (disabled))
+
+#.  ``queue_size``:
+
+    It is used to specify the queue size. (Default: 256)
+
+#.  ``queues``:
+
+    It is used to specify the queue number. (Default: 1)
+
+#.  ``iface``:
+
+    It is used to specify the host interface name for vhost-kernel
+    backend.
+
+#.  ``server``:
+
+    It is used to enable the server mode when using vhost-user backend.
+    (Default: 0 (disabled))
+
+#.  ``mrg_rxbuf``:
 
     It is used to enable virtio device mergeable Rx buffer feature.
     (Default: 1 (enabled))
 
-#. ``in_order``:
+#.  ``in_order``:
 
     It is used to enable virtio device in-order feature.
     (Default: 1 (enabled))
-- 
2.17.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 5/6] doc: document packed virtqueue for virtio
  2019-08-13  2:07 [dpdk-dev] [PATCH 0/6] Some updates for virtio guide Tiwei Bie
                   ` (3 preceding siblings ...)
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 4/6] doc: document the devargs for virtio-user Tiwei Bie
@ 2019-08-13  2:07 ` Tiwei Bie
  2019-09-06 13:21   ` Maxime Coquelin
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 6/6] doc: fix format for virtio guide Tiwei Bie
  2019-09-06 13:37 ` [dpdk-dev] [PATCH 0/6] Some updates " Maxime Coquelin
  6 siblings, 1 reply; 14+ messages in thread
From: Tiwei Bie @ 2019-08-13  2:07 UTC (permalink / raw)
  To: maxime.coquelin, zhihong.wang, john.mcnamara, marko.kovacevic, dev

Document the packed virtqueue layout support in virtio net PMD.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
 doc/guides/nics/virtio.rst | 63 ++++++++++++++++++++++++++++----------
 1 file changed, 47 insertions(+), 16 deletions(-)

diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst
index 993e691f5..011954ff6 100644
--- a/doc/guides/nics/virtio.rst
+++ b/doc/guides/nics/virtio.rst
@@ -24,15 +24,19 @@ standard qemu vhost back end and vhost kni back end.
 Virtio Implementation in DPDK
 -----------------------------
 
-For details about the virtio spec, refer to Virtio PCI Card Specification written by Rusty Russell.
+For details about the virtio spec, refer to the latest
+`VIRTIO (Virtual I/O) Device Specification
+<https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio>`_.
 
-As a PMD, virtio provides packet reception and transmission callbacks virtio_recv_pkts and virtio_xmit_pkts.
+As a PMD, virtio provides packet reception and transmission callbacks.
 
-In virtio_recv_pkts, index in range [vq->vq_used_cons_idx , vq->vq_ring.used->idx) in vring is available for virtio to burst out.
+In Rx, packets described by the used descriptors in vring are available
+for virtio to burst out.
 
-In virtio_xmit_pkts, same index range in vring is available for virtio to clean.
-Virtio will enqueue to be transmitted packets into vring, advance the vq->vq_ring.avail->idx,
-and then notify the host back end if necessary.
+In Tx, packets described by the used descriptors in vring are available
+for virtio to clean. Virtio will enqueue to be transmitted packets into
+vring, make them available to the device, and then notify the host back
+end if necessary.
 
 Features and Limitations of virtio PMD
 --------------------------------------
@@ -201,37 +205,52 @@ The packet transmission flow is:
 Virtio PMD Rx/Tx Callbacks
 --------------------------
 
-Virtio driver has 4 Rx callbacks and 2 Tx callbacks.
+Virtio driver has 6 Rx callbacks and 3 Tx callbacks.
 
 Rx callbacks:
 
 #. ``virtio_recv_pkts``:
-   Regular version without mergeable Rx buffer support.
+   Regular version without mergeable Rx buffer support for split virtqueue.
 
 #. ``virtio_recv_mergeable_pkts``:
-   Regular version with mergeable Rx buffer support.
+   Regular version with mergeable Rx buffer support for split virtqueue.
 
 #. ``virtio_recv_pkts_vec``:
    Vector version without mergeable Rx buffer support, also fixes the available
-   ring indexes and uses vector instructions to optimize performance.
+   ring indexes and uses vector instructions to optimize performance for split
+   virtqueue.
 
 #. ``virtio_recv_pkts_inorder``:
-   In-order version with mergeable and non-mergeable Rx buffer support.
+   In-order version with mergeable and non-mergeable Rx buffer support
+   for split virtqueue.
+
+#. ``virtio_recv_pkts_packed``:
+   Regular and in-order version without mergeable Rx buffer support for
+   packed virtqueue.
+
+#. ``virtio_recv_mergeable_pkts_packed``:
+   Regular and in-order version with mergeable Rx buffer support for packed
+   virtqueue.
 
 Tx callbacks:
 
 #. ``virtio_xmit_pkts``:
-   Regular version.
+   Regular version for split virtqueue.
 
 #. ``virtio_xmit_pkts_inorder``:
-   In-order version.
+   In-order version for split virtqueue.
+
+#. ``virtio_xmit_pkts_packed``:
+   Regular and in-order version for packed virtqueue.
 
 By default, the non-vector callbacks are used:
 
-*   For Rx: If mergeable Rx buffers is disabled then ``virtio_recv_pkts`` is
-    used; otherwise ``virtio_recv_mergeable_pkts``.
+*   For Rx: If mergeable Rx buffers is disabled then ``virtio_recv_pkts``
+    or ``virtio_recv_pkts_packed`` will be used, otherwise
+    ``virtio_recv_mergeable_pkts`` or ``virtio_recv_mergeable_pkts_packed``
+    will be used.
 
-*   For Tx: ``virtio_xmit_pkts``.
+*   For Tx: ``virtio_xmit_pkts`` or ``virtio_xmit_pkts_packed`` will be used.
 
 
 Vector callbacks will be used when:
@@ -242,6 +261,8 @@ The corresponding callbacks are:
 
 *   For Rx: ``virtio_recv_pkts_vec``.
 
+There is no vector callbacks for packed virtqueue for now.
+
 
 Example of using the vector version of the virtio poll mode driver in
 ``testpmd``::
@@ -250,10 +271,15 @@ Example of using the vector version of the virtio poll mode driver in
 
 In-order callbacks only work on simulated virtio user vdev.
 
+For split virtqueue:
+
 *   For Rx: If in-order is enabled then ``virtio_recv_pkts_inorder`` is used.
 
 *   For Tx: If in-order is enabled then ``virtio_xmit_pkts_inorder`` is used.
 
+For packed virtqueue, the default callbacks already support the
+in-order feature.
+
 Interrupt mode
 --------------
 
@@ -372,3 +398,8 @@ Below devargs are supported by the virtio-user vdev:
 
     It is used to enable virtio device in-order feature.
     (Default: 1 (enabled))
+
+#.  ``packed_vq``:
+
+    It is used to enable virtio device packed virtqueue feature.
+    (Default: 0 (disabled))
-- 
2.17.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH 6/6] doc: fix format for virtio guide
  2019-08-13  2:07 [dpdk-dev] [PATCH 0/6] Some updates for virtio guide Tiwei Bie
                   ` (4 preceding siblings ...)
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 5/6] doc: document packed virtqueue for virtio Tiwei Bie
@ 2019-08-13  2:07 ` Tiwei Bie
  2019-09-06 13:22   ` Maxime Coquelin
  2019-09-06 13:37 ` [dpdk-dev] [PATCH 0/6] Some updates " Maxime Coquelin
  6 siblings, 1 reply; 14+ messages in thread
From: Tiwei Bie @ 2019-08-13  2:07 UTC (permalink / raw)
  To: maxime.coquelin, zhihong.wang, john.mcnamara, marko.kovacevic, dev; +Cc: stable

This patch removes an unwanted empty line in a sentence.

Fixes: 71afcefbd53e ("doc: update virtio ring size and header size")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
 doc/guides/nics/virtio.rst | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst
index 011954ff6..bd0116176 100644
--- a/doc/guides/nics/virtio.rst
+++ b/doc/guides/nics/virtio.rst
@@ -7,7 +7,6 @@ Poll Mode Driver for Emulated Virtio NIC
 Virtio is a para-virtualization framework initiated by IBM, and supported by KVM hypervisor.
 In the Data Plane Development Kit (DPDK),
 we provide a virtio Poll Mode Driver (PMD) as a software solution, comparing to SRIOV hardware solution,
-
 for fast guest VM to guest VM communication and guest VM to host communication.
 
 Vhost is a kernel acceleration module for virtio qemu backend.
-- 
2.17.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH 1/6] net/virtio: remove remaining simple Tx related stuff
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 1/6] net/virtio: remove remaining simple Tx related stuff Tiwei Bie
@ 2019-09-06 13:15   ` Maxime Coquelin
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2019-09-06 13:15 UTC (permalink / raw)
  To: Tiwei Bie, zhihong.wang, john.mcnamara, marko.kovacevic, dev; +Cc: stable



On 8/13/19 4:07 AM, Tiwei Bie wrote:
> The simple Tx path in virtio has been removed in below commit.
> This patch removes an undefined function declaration of simple
> Tx and all related descriptions in the doc.
> 
> Fixes: 57f818963d80 ("net/virtio: remove simple Tx path")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
>  doc/guides/nics/virtio.rst         | 15 ++-------------
>  drivers/net/virtio/virtio_ethdev.h |  3 ---
>  2 files changed, 2 insertions(+), 16 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH 2/6] doc: fix typo in virtio in-order Rx function name
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 2/6] doc: fix typo in virtio in-order Rx function name Tiwei Bie
@ 2019-09-06 13:16   ` Maxime Coquelin
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2019-09-06 13:16 UTC (permalink / raw)
  To: Tiwei Bie, zhihong.wang, john.mcnamara, marko.kovacevic, dev; +Cc: stable



On 8/13/19 4:07 AM, Tiwei Bie wrote:
> The Rx function that will be used when in-order is enabled
> should be virtio_recv_mergeable_pkts_inorder() instead of
> virtio_xmit_pkts_inorder().
> 
> Fixes: 8f3bd7e8702d ("net/virtio: add in-order Rx/Tx into selection")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
>  doc/guides/nics/virtio.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH 3/6] doc: update the description for in-order Rx path
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 3/6] doc: update the description for in-order Rx path Tiwei Bie
@ 2019-09-06 13:18   ` Maxime Coquelin
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2019-09-06 13:18 UTC (permalink / raw)
  To: Tiwei Bie, zhihong.wang, john.mcnamara, marko.kovacevic, dev; +Cc: stable



On 8/13/19 4:07 AM, Tiwei Bie wrote:
> The virtio_recv_mergeable_pkts_inorder() has been renamed to
> virtio_recv_pkts_inorder() and added the non-mergeable support
> in below commit.
> 
> Fixes: efcda13648d2 ("net/virtio: add non-mergeable support to in-order path")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
>  doc/guides/nics/virtio.rst | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH 4/6] doc: document the devargs for virtio-user
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 4/6] doc: document the devargs for virtio-user Tiwei Bie
@ 2019-09-06 13:20   ` Maxime Coquelin
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2019-09-06 13:20 UTC (permalink / raw)
  To: Tiwei Bie, zhihong.wang, john.mcnamara, marko.kovacevic, dev



On 8/13/19 4:07 AM, Tiwei Bie wrote:
> Document the devargs for virtio-user and also make it clear
> that these devargs are only available in virtio-user, i.e. not
> supported by the PCI virtio driver.
> 
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
>  doc/guides/nics/virtio.rst | 38 +++++++++++++++++++++++++++++++++++---
>  1 file changed, 35 insertions(+), 3 deletions(-)

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH 5/6] doc: document packed virtqueue for virtio
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 5/6] doc: document packed virtqueue for virtio Tiwei Bie
@ 2019-09-06 13:21   ` Maxime Coquelin
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2019-09-06 13:21 UTC (permalink / raw)
  To: Tiwei Bie, zhihong.wang, john.mcnamara, marko.kovacevic, dev



On 8/13/19 4:07 AM, Tiwei Bie wrote:
> Document the packed virtqueue layout support in virtio net PMD.
> 
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
>  doc/guides/nics/virtio.rst | 63 ++++++++++++++++++++++++++++----------
>  1 file changed, 47 insertions(+), 16 deletions(-)
> 
> diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst
> index 993e691f5..011954ff6 100644
> --- a/doc/guides/nics/virtio.rst
> +++ b/doc/guides/nics/virtio.rst
> @@ -24,15 +24,19 @@ standard qemu vhost back end and vhost kni back end.
>  Virtio Implementation in DPDK
>  -----------------------------
>  
> -For details about the virtio spec, refer to Virtio PCI Card Specification written by Rusty Russell.
> +For details about the virtio spec, refer to the latest
> +`VIRTIO (Virtual I/O) Device Specification
> +<https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio>`_.
>  
> -As a PMD, virtio provides packet reception and transmission callbacks virtio_recv_pkts and virtio_xmit_pkts.
> +As a PMD, virtio provides packet reception and transmission callbacks.
>  
> -In virtio_recv_pkts, index in range [vq->vq_used_cons_idx , vq->vq_ring.used->idx) in vring is available for virtio to burst out.
> +In Rx, packets described by the used descriptors in vring are available
> +for virtio to burst out.
>  
> -In virtio_xmit_pkts, same index range in vring is available for virtio to clean.
> -Virtio will enqueue to be transmitted packets into vring, advance the vq->vq_ring.avail->idx,
> -and then notify the host back end if necessary.
> +In Tx, packets described by the used descriptors in vring are available
> +for virtio to clean. Virtio will enqueue to be transmitted packets into
> +vring, make them available to the device, and then notify the host back
> +end if necessary.
>  
>  Features and Limitations of virtio PMD
>  --------------------------------------
> @@ -201,37 +205,52 @@ The packet transmission flow is:
>  Virtio PMD Rx/Tx Callbacks
>  --------------------------
>  
> -Virtio driver has 4 Rx callbacks and 2 Tx callbacks.
> +Virtio driver has 6 Rx callbacks and 3 Tx callbacks.
>  
>  Rx callbacks:
>  
>  #. ``virtio_recv_pkts``:
> -   Regular version without mergeable Rx buffer support.
> +   Regular version without mergeable Rx buffer support for split virtqueue.
>  
>  #. ``virtio_recv_mergeable_pkts``:
> -   Regular version with mergeable Rx buffer support.
> +   Regular version with mergeable Rx buffer support for split virtqueue.
>  
>  #. ``virtio_recv_pkts_vec``:
>     Vector version without mergeable Rx buffer support, also fixes the available
> -   ring indexes and uses vector instructions to optimize performance.
> +   ring indexes and uses vector instructions to optimize performance for split
> +   virtqueue.
>  
>  #. ``virtio_recv_pkts_inorder``:
> -   In-order version with mergeable and non-mergeable Rx buffer support.
> +   In-order version with mergeable and non-mergeable Rx buffer support
> +   for split virtqueue.
> +
> +#. ``virtio_recv_pkts_packed``:
> +   Regular and in-order version without mergeable Rx buffer support for
> +   packed virtqueue.
> +
> +#. ``virtio_recv_mergeable_pkts_packed``:
> +   Regular and in-order version with mergeable Rx buffer support for packed
> +   virtqueue.
>  
>  Tx callbacks:
>  
>  #. ``virtio_xmit_pkts``:
> -   Regular version.
> +   Regular version for split virtqueue.
>  
>  #. ``virtio_xmit_pkts_inorder``:
> -   In-order version.
> +   In-order version for split virtqueue.
> +
> +#. ``virtio_xmit_pkts_packed``:
> +   Regular and in-order version for packed virtqueue.
>  
>  By default, the non-vector callbacks are used:
>  
> -*   For Rx: If mergeable Rx buffers is disabled then ``virtio_recv_pkts`` is
> -    used; otherwise ``virtio_recv_mergeable_pkts``.
> +*   For Rx: If mergeable Rx buffers is disabled then ``virtio_recv_pkts``
> +    or ``virtio_recv_pkts_packed`` will be used, otherwise
> +    ``virtio_recv_mergeable_pkts`` or ``virtio_recv_mergeable_pkts_packed``
> +    will be used.
>  
> -*   For Tx: ``virtio_xmit_pkts``.
> +*   For Tx: ``virtio_xmit_pkts`` or ``virtio_xmit_pkts_packed`` will be used.
>  
>  
>  Vector callbacks will be used when:
> @@ -242,6 +261,8 @@ The corresponding callbacks are:
>  
>  *   For Rx: ``virtio_recv_pkts_vec``.
>  
> +There is no vector callbacks for packed virtqueue for now.
> +
>  
>  Example of using the vector version of the virtio poll mode driver in
>  ``testpmd``::
> @@ -250,10 +271,15 @@ Example of using the vector version of the virtio poll mode driver in
>  
>  In-order callbacks only work on simulated virtio user vdev.
>  
> +For split virtqueue:
> +
>  *   For Rx: If in-order is enabled then ``virtio_recv_pkts_inorder`` is used.
>  
>  *   For Tx: If in-order is enabled then ``virtio_xmit_pkts_inorder`` is used.
>  
> +For packed virtqueue, the default callbacks already support the
> +in-order feature.
> +
>  Interrupt mode
>  --------------
>  
> @@ -372,3 +398,8 @@ Below devargs are supported by the virtio-user vdev:
>  
>      It is used to enable virtio device in-order feature.
>      (Default: 1 (enabled))
> +
> +#.  ``packed_vq``:
> +
> +    It is used to enable virtio device packed virtqueue feature.
> +    (Default: 0 (disabled))
> 

Side note: One day, we may consider to enable it by default.

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH 6/6] doc: fix format for virtio guide
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 6/6] doc: fix format for virtio guide Tiwei Bie
@ 2019-09-06 13:22   ` Maxime Coquelin
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2019-09-06 13:22 UTC (permalink / raw)
  To: Tiwei Bie, zhihong.wang, john.mcnamara, marko.kovacevic, dev; +Cc: stable



On 8/13/19 4:07 AM, Tiwei Bie wrote:
> This patch removes an unwanted empty line in a sentence.
> 
> Fixes: 71afcefbd53e ("doc: update virtio ring size and header size")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
>  doc/guides/nics/virtio.rst | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst
> index 011954ff6..bd0116176 100644
> --- a/doc/guides/nics/virtio.rst
> +++ b/doc/guides/nics/virtio.rst
> @@ -7,7 +7,6 @@ Poll Mode Driver for Emulated Virtio NIC
>  Virtio is a para-virtualization framework initiated by IBM, and supported by KVM hypervisor.
>  In the Data Plane Development Kit (DPDK),
>  we provide a virtio Poll Mode Driver (PMD) as a software solution, comparing to SRIOV hardware solution,
> -
>  for fast guest VM to guest VM communication and guest VM to host communication.
>  
>  Vhost is a kernel acceleration module for virtio qemu backend.
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH 0/6] Some updates for virtio guide
  2019-08-13  2:07 [dpdk-dev] [PATCH 0/6] Some updates for virtio guide Tiwei Bie
                   ` (5 preceding siblings ...)
  2019-08-13  2:07 ` [dpdk-dev] [PATCH 6/6] doc: fix format for virtio guide Tiwei Bie
@ 2019-09-06 13:37 ` " Maxime Coquelin
  6 siblings, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2019-09-06 13:37 UTC (permalink / raw)
  To: Tiwei Bie, zhihong.wang, john.mcnamara, marko.kovacevic, dev



On 8/13/19 4:07 AM, Tiwei Bie wrote:
> Tiwei Bie (6):
>   net/virtio: remove remaining simple Tx related stuff
>   doc: fix typo in virtio in-order Rx function name
>   doc: update the description for in-order Rx path
>   doc: document the devargs for virtio-user
>   doc: document packed virtqueue for virtio
>   doc: fix format for virtio guide
> 
>  doc/guides/nics/virtio.rst         | 118 ++++++++++++++++++++---------
>  drivers/net/virtio/virtio_ethdev.h |   3 -
>  2 files changed, 84 insertions(+), 37 deletions(-)
> 

Series applied to dpdk-next-virtio.

Thanks for taking care of the doc!
Maxime

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, back to index

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13  2:07 [dpdk-dev] [PATCH 0/6] Some updates for virtio guide Tiwei Bie
2019-08-13  2:07 ` [dpdk-dev] [PATCH 1/6] net/virtio: remove remaining simple Tx related stuff Tiwei Bie
2019-09-06 13:15   ` Maxime Coquelin
2019-08-13  2:07 ` [dpdk-dev] [PATCH 2/6] doc: fix typo in virtio in-order Rx function name Tiwei Bie
2019-09-06 13:16   ` Maxime Coquelin
2019-08-13  2:07 ` [dpdk-dev] [PATCH 3/6] doc: update the description for in-order Rx path Tiwei Bie
2019-09-06 13:18   ` Maxime Coquelin
2019-08-13  2:07 ` [dpdk-dev] [PATCH 4/6] doc: document the devargs for virtio-user Tiwei Bie
2019-09-06 13:20   ` Maxime Coquelin
2019-08-13  2:07 ` [dpdk-dev] [PATCH 5/6] doc: document packed virtqueue for virtio Tiwei Bie
2019-09-06 13:21   ` Maxime Coquelin
2019-08-13  2:07 ` [dpdk-dev] [PATCH 6/6] doc: fix format for virtio guide Tiwei Bie
2019-09-06 13:22   ` Maxime Coquelin
2019-09-06 13:37 ` [dpdk-dev] [PATCH 0/6] Some updates " Maxime Coquelin

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org dpdk-dev@archiver.kernel.org
	public-inbox-index dpdk-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox