diff mbox series

[ovs-dev,V5,1/2] netdev-dpdk: DPDK v17.11 upgrade

Message ID 1512668737-15021-2-git-send-email-mark.b.kavanagh@intel.com
State Superseded
Headers show
Series DPDK v17.11 Support | expand

Commit Message

Mark Kavanagh Dec. 7, 2017, 5:45 p.m. UTC
This commit adds support for DPDK v17.11:
- minor updates to accomodate DPDK API changes
- update references to DPDK version in Documentation
- update DPDK version in travis' linux-build script
- document DPDK v17.11 virtio driver bug

Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Jan Scheurich <jan.scheurich@ericsson.com>
Tested-by: Jan Scheurich <jan.scheurich@ericsson.com>
Tested-by: Guoshuai Li <ligs@dtdream.com>
---
 .travis/linux-build.sh                   |  2 +-
 Documentation/faq/releases.rst           |  1 +
 Documentation/intro/install/dpdk.rst     | 24 +++++++++++++++++++-----
 Documentation/topics/dpdk/ring.rst       |  2 +-
 Documentation/topics/dpdk/vhost-user.rst |  5 +++++
 NEWS                                     |  2 ++
 lib/netdev-dpdk.c                        |  5 +++--
 7 files changed, 32 insertions(+), 9 deletions(-)

Comments

Tiwei Bie Dec. 8, 2017, 4:18 a.m. UTC | #1
On Thu, Dec 07, 2017 at 05:45:36PM +0000, Mark Kavanagh wrote:
> This commit adds support for DPDK v17.11:
> - minor updates to accomodate DPDK API changes
> - update references to DPDK version in Documentation
> - update DPDK version in travis' linux-build script
> - document DPDK v17.11 virtio driver bug
> 
> Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> Acked-by: Ciara Loftus <ciara.loftus@intel.com>
> Acked-by: Jan Scheurich <jan.scheurich@ericsson.com>
> Tested-by: Jan Scheurich <jan.scheurich@ericsson.com>
> Tested-by: Guoshuai Li <ligs@dtdream.com>
> ---
[...]
>  
> -.. _DPDK release notes: http://dpdk.org/doc/guides/rel_notes/release_17_05.html
> +.. _DPDK release notes: http://dpdk.org/doc/guides/rel_notes/release_17_11.html
> +
> +- The DPDK v17.11 virtio net driver contains a bug that prevents guest DPDK
> +  applications from receiving packets. This only occurs when guest-bound traffic
> +  is live before a DPDK application is started within the guest, and where two
> +  or more forwarding cores are used. As such, it is not recommended for guests
> +  which execute DPDK applications to upgrade to DPDK v17.11.
> +
> +  Note that this issue does not occur when guest network devices are controlled
> +  by the guest kernel.
> +
> +  Details regarding the virtio driver bug are available on the `DPDK mailing
> +  list`_.
> +
> +.. _DPDK mailing list: http://dpdk.org/ml/archives/dev/2017-December/082801.html
>  
>  Reporting Bugs
>  --------------
> diff --git a/Documentation/topics/dpdk/ring.rst b/Documentation/topics/dpdk/ring.rst
> index ad9d7a5..8d0ede8 100644
> --- a/Documentation/topics/dpdk/ring.rst
> +++ b/Documentation/topics/dpdk/ring.rst
> @@ -77,4 +77,4 @@ DPDK. However, this functionality was removed because:
>  - :doc:`vhost-user interfaces <vhost-user>` are the defacto DPDK-based path to
>    guests
>  
> -.. _DPDK documentation: https://dpdk.readthedocs.io/en/v17.05/prog_guide/ring_lib.html
> +.. _DPDK documentation: https://dpdk.readthedocs.io/en/v17.11/prog_guide/ring_lib.html
> diff --git a/Documentation/topics/dpdk/vhost-user.rst b/Documentation/topics/dpdk/vhost-user.rst
> index 74ac06e..1a5de24 100644
> --- a/Documentation/topics/dpdk/vhost-user.rst
> +++ b/Documentation/topics/dpdk/vhost-user.rst
> @@ -287,6 +287,11 @@ application in the VM.
>  
>    Support for DPDK in the guest requires QEMU >= 2.2
>  
> +.. important::
> +
> +  DPDK v17.11 virtio PMD contains a bug that affects testpmd/DPDK guest
> +  applications. As such, guests should not upgrade to 17.11.
> +

I'm not very familiar with the use case related to ovs.
The bug you mentioned only affects the vector Rx of virtio
PMD, while the vector Rx won't be enabled by default, as
it has the most limitations among the three Rx functions
in virtio PMD, e.g. it's not able to handle the mergeable
rxbuf (VIRTIO_NET_F_MRG_RXBUF) which is enabled by default
and commonly used. But I'm not sure whether the vector Rx
of virtio PMD is commonly used in ovs related cases.

If it's really necessary to document a PMD bug of DPDK in
ovs, I think we should provide more accurate info in this
warning, e.g. warn users not to use vector Rx when using
virtio PMD instead of warning them not to use DPDK 17.11.

Thanks,
Tiwei
Jan Scheurich Dec. 8, 2017, 10:01 a.m. UTC | #2
> From: Mark Kavanagh [mailto:mark.b.kavanagh@intel.com]
> Sent: Thursday, 07 December, 2017 18:46
> 
>  #. (Optional) Configure DPDK as a shared library
> @@ -583,7 +583,21 @@ Limitations
>    The latest list of validated firmware versions can be found in the `DPDK
>    release notes`_.
> 
> -.. _DPDK release notes: http://dpdk.org/doc/guides/rel_notes/release_17_05.html
> +.. _DPDK release notes: http://dpdk.org/doc/guides/rel_notes/release_17_11.html
> +
> +- The DPDK v17.11 virtio net driver contains a bug that prevents guest DPDK
> +  applications from receiving packets. This only occurs when guest-bound traffic
> +  is live before a DPDK application is started within the guest, and where two
> +  or more forwarding cores are used. As such, it is not recommended for guests
> +  which execute DPDK applications to upgrade to DPDK v17.11.
> +
> +  Note that this issue does not occur when guest network devices are controlled
> +  by the guest kernel.

I don't think this aspect should be documented as a limitation of OVS. It is a bug that can affect DPDK 17.11 guest applications under certain conditions. If at all we should have the such a statement in the dpdk/vhost_user.rst document (see below).

I am missing a statement here that OVS-DPDK itself, when running in a VM with virtio interfaces, can be affected by this bug of the virtio PMD. A work-around until the bug is fixed could be to make sure mergeable rx buffers are enabled for the virtio ports in Qemu and vhost backend on the host, so that the virtio PMD does not use the faulty vector Rx function.

> +
> +  Details regarding the virtio driver bug are available on the `DPDK mailing
> +  list`_.
> +
> +.. _DPDK mailing list: http://dpdk.org/ml/archives/dev/2017-December/082801.html
> 
>  Reporting Bugs
>  --------------
> diff --git a/Documentation/topics/dpdk/ring.rst b/Documentation/topics/dpdk/ring.rst
> index ad9d7a5..8d0ede8 100644
> --- a/Documentation/topics/dpdk/ring.rst
> +++ b/Documentation/topics/dpdk/ring.rst
> @@ -77,4 +77,4 @@ DPDK. However, this functionality was removed because:
>  - :doc:`vhost-user interfaces <vhost-user>` are the defacto DPDK-based path to
>    guests
> 
> -.. _DPDK documentation: https://dpdk.readthedocs.io/en/v17.05/prog_guide/ring_lib.html
> +.. _DPDK documentation: https://dpdk.readthedocs.io/en/v17.11/prog_guide/ring_lib.html
> diff --git a/Documentation/topics/dpdk/vhost-user.rst b/Documentation/topics/dpdk/vhost-user.rst
> index 74ac06e..1a5de24 100644
> --- a/Documentation/topics/dpdk/vhost-user.rst
> +++ b/Documentation/topics/dpdk/vhost-user.rst
> @@ -287,6 +287,11 @@ application in the VM.
> 
>    Support for DPDK in the guest requires QEMU >= 2.2
> 
> +.. important::
> +
> +  DPDK v17.11 virtio PMD contains a bug that affects testpmd/DPDK guest
> +  applications. As such, guests should not upgrade to 17.11.

If such a temporary bug warning is really wanted here, it needs to be more qualified.
Mark Kavanagh Dec. 8, 2017, 10:11 a.m. UTC | #3
>From: Bie, Tiwei

>Sent: Friday, December 8, 2017 4:19 AM

>To: Kavanagh, Mark B <mark.b.kavanagh@intel.com>

>Cc: dev@openvswitch.org; ktraynor@redhat.com; maxime.coquelin@redhat.com;

>i.maximets@samsung.com; jan.scheurich@ericsson.com; Mooney, Sean K

><sean.k.mooney@intel.com>; Stokes, Ian <ian.stokes@intel.com>;

>ligs@dtdream.com; Fischetti, Antonio <antonio.fischetti@intel.com>; Loftus,

>Ciara <ciara.loftus@intel.com>; Mcnamara, John <john.mcnamara@intel.com>;

>yliu@fridaylinux.org

>Subject: Re: [ovs-dev][PATCH V5 1/2] netdev-dpdk: DPDK v17.11 upgrade

>

>On Thu, Dec 07, 2017 at 05:45:36PM +0000, Mark Kavanagh wrote:

>> This commit adds support for DPDK v17.11:

>> - minor updates to accomodate DPDK API changes

>> - update references to DPDK version in Documentation

>> - update DPDK version in travis' linux-build script

>> - document DPDK v17.11 virtio driver bug

>>

>> Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>

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

>> Acked-by: Ciara Loftus <ciara.loftus@intel.com>

>> Acked-by: Jan Scheurich <jan.scheurich@ericsson.com>

>> Tested-by: Jan Scheurich <jan.scheurich@ericsson.com>

>> Tested-by: Guoshuai Li <ligs@dtdream.com>

>> ---

>[...]

>>

>> -.. _DPDK release notes:

>http://dpdk.org/doc/guides/rel_notes/release_17_05.html

>> +.. _DPDK release notes:

>http://dpdk.org/doc/guides/rel_notes/release_17_11.html

>> +

>> +- The DPDK v17.11 virtio net driver contains a bug that prevents guest DPDK

>> +  applications from receiving packets. This only occurs when guest-bound

>traffic

>> +  is live before a DPDK application is started within the guest, and where

>two

>> +  or more forwarding cores are used. As such, it is not recommended for

>guests

>> +  which execute DPDK applications to upgrade to DPDK v17.11.

>> +

>> +  Note that this issue does not occur when guest network devices are

>controlled

>> +  by the guest kernel.

>> +

>> +  Details regarding the virtio driver bug are available on the `DPDK

>mailing

>> +  list`_.

>> +

>> +.. _DPDK mailing list: http://dpdk.org/ml/archives/dev/2017-

>December/082801.html

>>

>>  Reporting Bugs

>>  --------------

>> diff --git a/Documentation/topics/dpdk/ring.rst

>b/Documentation/topics/dpdk/ring.rst

>> index ad9d7a5..8d0ede8 100644

>> --- a/Documentation/topics/dpdk/ring.rst

>> +++ b/Documentation/topics/dpdk/ring.rst

>> @@ -77,4 +77,4 @@ DPDK. However, this functionality was removed because:

>>  - :doc:`vhost-user interfaces <vhost-user>` are the defacto DPDK-based path

>to

>>    guests

>>

>> -.. _DPDK documentation:

>https://dpdk.readthedocs.io/en/v17.05/prog_guide/ring_lib.html

>> +.. _DPDK documentation:

>https://dpdk.readthedocs.io/en/v17.11/prog_guide/ring_lib.html

>> diff --git a/Documentation/topics/dpdk/vhost-user.rst

>b/Documentation/topics/dpdk/vhost-user.rst

>> index 74ac06e..1a5de24 100644

>> --- a/Documentation/topics/dpdk/vhost-user.rst

>> +++ b/Documentation/topics/dpdk/vhost-user.rst

>> @@ -287,6 +287,11 @@ application in the VM.

>>

>>    Support for DPDK in the guest requires QEMU >= 2.2

>>

>> +.. important::

>> +

>> +  DPDK v17.11 virtio PMD contains a bug that affects testpmd/DPDK guest

>> +  applications. As such, guests should not upgrade to 17.11.

>> +

>

>I'm not very familiar with the use case related to ovs.

>The bug you mentioned only affects the vector Rx of virtio

>PMD, while the vector Rx won't be enabled by default, as

>it has the most limitations among the three Rx functions

>in virtio PMD, e.g. it's not able to handle the mergeable

>rxbuf (VIRTIO_NET_F_MRG_RXBUF) which is enabled by default

>and commonly used. But I'm not sure whether the vector Rx

>of virtio PMD is commonly used in ovs related cases.


Hi Tiwei,

For optimal performance, in OvS we recommend that users disable mergeable buffers; as such, I’d imagine that the vector Rx function will be used in most cases.

>

>If it's really necessary to document a PMD bug of DPDK in

>ovs, I think we should provide more accurate info in this

>warning, e.g. warn users not to use vector Rx when using

>virtio PMD instead of warning them not to use DPDK 17.11.


Agreed - I just saw the mail exchange between yourself and Kevin regarding same.

I'll update the documentation accordingly in v6.

Thanks and best,
Mark

>

>Thanks,

>Tiwei
Stokes, Ian Dec. 8, 2017, 10:13 a.m. UTC | #4
> This commit adds support for DPDK v17.11:
> - minor updates to accomodate DPDK API changes
> - update references to DPDK version in Documentation
> - update DPDK version in travis' linux-build script
> - document DPDK v17.11 virtio driver bug
> 
> Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> Acked-by: Ciara Loftus <ciara.loftus@intel.com>
> Acked-by: Jan Scheurich <jan.scheurich@ericsson.com>
> Tested-by: Jan Scheurich <jan.scheurich@ericsson.com>
> Tested-by: Guoshuai Li <ligs@dtdream.com>
> ---
>  .travis/linux-build.sh                   |  2 +-
>  Documentation/faq/releases.rst           |  1 +
>  Documentation/intro/install/dpdk.rst     | 24 +++++++++++++++++++-----
>  Documentation/topics/dpdk/ring.rst       |  2 +-
>  Documentation/topics/dpdk/vhost-user.rst |  5 +++++
>  NEWS                                     |  2 ++
>  lib/netdev-dpdk.c                        |  5 +++--
>  7 files changed, 32 insertions(+), 9 deletions(-)
> 
> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh index
> 4d6459f..ed28ee4 100755
> --- a/.travis/linux-build.sh
> +++ b/.travis/linux-build.sh
> @@ -81,7 +81,7 @@ fi
> 
>  if [ "$DPDK" ]; then
>      if [ -z "$DPDK_VER" ]; then
> -        DPDK_VER="17.05.2"
> +        DPDK_VER="17.11"
>      fi
>      install_dpdk $DPDK_VER
>      if [ "$CC" = "clang" ]; then
> diff --git a/Documentation/faq/releases.rst
> b/Documentation/faq/releases.rst index d903b06..62a1957 100644
> --- a/Documentation/faq/releases.rst
> +++ b/Documentation/faq/releases.rst
> @@ -164,6 +164,7 @@ Q: What DPDK version does each Open vSwitch release
> work with?
>      2.6.x        16.07.2
>      2.7.x        16.11.3
>      2.8.x        17.05.2
> +    2.9.x        17.11
>      ============ =======
> 
>  Q: I get an error like this when I configure Open vSwitch:
> diff --git a/Documentation/intro/install/dpdk.rst
> b/Documentation/intro/install/dpdk.rst
> index bb69ae5..8c036dc 100644
> --- a/Documentation/intro/install/dpdk.rst
> +++ b/Documentation/intro/install/dpdk.rst
> @@ -40,7 +40,7 @@ Build requirements
>  In addition to the requirements described in :doc:`general`, building
> Open  vSwitch with DPDK will require the following:
> 
> -- DPDK 17.05.2
> +- DPDK 17.11
> 
>  - A `DPDK supported NIC`_
> 
> @@ -69,9 +69,9 @@ Install DPDK
>  #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
> 
>         $ cd /usr/src/
> -       $ wget http://fast.dpdk.org/rel/dpdk-17.05.2.tar.xz
> -       $ tar xf dpdk-17.05.2.tar.xz
> -       $ export DPDK_DIR=/usr/src/dpdk-stable-17.05.2
> +       $ wget http://fast.dpdk.org/rel/dpdk-17.11.tar.xz
> +       $ tar xf dpdk-17.11.tar.xz
> +       $ export DPDK_DIR=/usr/src/dpdk-17.11
>         $ cd $DPDK_DIR
> 
>  #. (Optional) Configure DPDK as a shared library @@ -583,7 +583,21 @@
> Limitations
>    The latest list of validated firmware versions can be found in the
> `DPDK
>    release notes`_.
> 
> -.. _DPDK release notes:
> http://dpdk.org/doc/guides/rel_notes/release_17_05.html
> +.. _DPDK release notes:
> +http://dpdk.org/doc/guides/rel_notes/release_17_11.html
> +
> +- The DPDK v17.11 virtio net driver contains a bug that prevents guest
> +DPDK
> +  applications from receiving packets. This only occurs when
> +guest-bound traffic
> +  is live before a DPDK application is started within the guest, and
> +where two
> +  or more forwarding cores are used. As such, it is not recommended for
> +guests
> +  which execute DPDK applications to upgrade to DPDK v17.11.
> +
> +  Note that this issue does not occur when guest network devices are
> + controlled  by the guest kernel.
> +
> +  Details regarding the virtio driver bug are available on the `DPDK
> + mailing  list`_.
> +
> +.. _DPDK mailing list:
> +http://dpdk.org/ml/archives/dev/2017-December/082801.html
> 

Minor Nit above, checkpatch utility complains

== Checking "/home/istokes/patch_reviews/ovs-dev-V5-1-2-netdev-dpdk-DPDK-v17.11-upgrade.patch" ==
WARNING: Line length is >79-characters long
#82 FILE: Documentation/intro/install/dpdk.rst:589:
  applications from receiving packets. This only occurs when guest-bound traffic

I'd like to see this fixed in the rework.

WARNING: Line length is >79-characters long
#93 FILE: Documentation/intro/install/dpdk.rst:600:
.. _DPDK mailing list: http://dpdk.org/ml/archives/dev/2017-December/082801.html

WARNING: Line length is >79-characters long
#106 FILE: Documentation/topics/dpdk/ring.rst:80:
.. _DPDK documentation: https://dpdk.readthedocs.io/en/v17.11/prog_guide/ring_lib.html

Lines checked: 159, Warnings: 3, Errors: 0

The two http doc links above surpass the 79 char boundary, but they follow and replace existing link examples in the doc. I think it makes sense in terms of formatting and readability to leave them as is.

>  Reporting Bugs
>  --------------
> diff --git a/Documentation/topics/dpdk/ring.rst
> b/Documentation/topics/dpdk/ring.rst
> index ad9d7a5..8d0ede8 100644
> --- a/Documentation/topics/dpdk/ring.rst
> +++ b/Documentation/topics/dpdk/ring.rst
> @@ -77,4 +77,4 @@ DPDK. However, this functionality was removed because:
>  - :doc:`vhost-user interfaces <vhost-user>` are the defacto DPDK-based
> path to
>    guests
> 
> -.. _DPDK documentation:
> https://dpdk.readthedocs.io/en/v17.05/prog_guide/ring_lib.html
> +.. _DPDK documentation:
> +https://dpdk.readthedocs.io/en/v17.11/prog_guide/ring_lib.html
> diff --git a/Documentation/topics/dpdk/vhost-user.rst
> b/Documentation/topics/dpdk/vhost-user.rst
> index 74ac06e..1a5de24 100644
> --- a/Documentation/topics/dpdk/vhost-user.rst
> +++ b/Documentation/topics/dpdk/vhost-user.rst
> @@ -287,6 +287,11 @@ application in the VM.
> 
>    Support for DPDK in the guest requires QEMU >= 2.2
> 
> +.. important::
> +
> +  DPDK v17.11 virtio PMD contains a bug that affects testpmd/DPDK guest
> + applications. As such, guests should not upgrade to 17.11.
> +
>  To begin, instantiate a guest as described in :ref:`dpdk-vhost-user` or
> :ref:`dpdk-vhost-user-client`. Once started, connect to the VM, download
> the  DPDK sources to VM and build DPDK::
> diff --git a/NEWS b/NEWS
> index 427c8f8..d4a1c9a 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -13,6 +13,8 @@ Post-v2.8.0
>       * ovn-ctl: New commands run_nb_ovsdb and run_sb_ovsdb.
>     - Linux kernel 4.13
>       * Add support for compiling OVS with the latest Linux 4.13 kernel
> +   - DPDK:
> +     * Add support for DPDK v17.11
> 
>  v2.8.0 - 31 Aug 2017
>  --------------------
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index faff842..f552444
> 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -26,6 +26,7 @@
>  #include <sys/socket.h>
>  #include <linux/if.h>
> 
> +#include <rte_bus_pci.h>
>  #include <rte_config.h>
>  #include <rte_cycles.h>
>  #include <rte_errno.h>
> @@ -140,8 +141,8 @@ static struct vlog_rate_limit rl =
> VLOG_RATE_LIMIT_INIT(5, 20);
> 
>  #define DPDK_ETH_PORT_ID_INVALID    RTE_MAX_ETHPORTS
> 
> -/* DPDK library uses uint8_t for port_id. */ -typedef uint8_t
> dpdk_port_t;
> +/* DPDK library uses uint16_t for port_id. */ typedef uint16_t
> +dpdk_port_t;
> 
>  #define VHOST_ENQ_RETRY_NUM 8
>  #define IF_NAME_SZ (PATH_MAX > IFNAMSIZ ? PATH_MAX : IFNAMSIZ)
> --
> 1.9.3
Mark Kavanagh Dec. 8, 2017, 10:18 a.m. UTC | #5
>From: Jan Scheurich [mailto:jan.scheurich@ericsson.com]
>Sent: Friday, December 8, 2017 10:01 AM
>To: Kavanagh, Mark B <mark.b.kavanagh@intel.com>; dev@openvswitch.org
>Cc: ktraynor@redhat.com; maxime.coquelin@redhat.com; i.maximets@samsung.com;
>Mooney, Sean K <sean.k.mooney@intel.com>; Stokes, Ian <ian.stokes@intel.com>;
>ligs@dtdream.com; Fischetti, Antonio <antonio.fischetti@intel.com>; Bie, Tiwei
><tiwei.bie@intel.com>; Loftus, Ciara <ciara.loftus@intel.com>
>Subject: RE: [ovs-dev][PATCH V5 1/2] netdev-dpdk: DPDK v17.11 upgrade
>
>> From: Mark Kavanagh [mailto:mark.b.kavanagh@intel.com]
>> Sent: Thursday, 07 December, 2017 18:46
>>
>>  #. (Optional) Configure DPDK as a shared library
>> @@ -583,7 +583,21 @@ Limitations
>>    The latest list of validated firmware versions can be found in the `DPDK
>>    release notes`_.
>>
>> -.. _DPDK release notes:
>http://dpdk.org/doc/guides/rel_notes/release_17_05.html
>> +.. _DPDK release notes:
>http://dpdk.org/doc/guides/rel_notes/release_17_11.html
>> +
>> +- The DPDK v17.11 virtio net driver contains a bug that prevents guest DPDK
>> +  applications from receiving packets. This only occurs when guest-bound
>traffic
>> +  is live before a DPDK application is started within the guest, and where
>two
>> +  or more forwarding cores are used. As such, it is not recommended for
>guests
>> +  which execute DPDK applications to upgrade to DPDK v17.11.
>> +
>> +  Note that this issue does not occur when guest network devices are
>controlled
>> +  by the guest kernel.
>

Hi Jan,

Thanks for your comments - please find responses inline.

Best,
Mark

>I don't think this aspect should be documented as a limitation of OVS. It is a
>bug that can affect DPDK 17.11 guest applications under certain conditions. If
>at all we should have the such a statement in the dpdk/vhost_user.rst document
>(see below).

Good point - I'll move this text to the vhost_user doc.

>
>I am missing a statement here that OVS-DPDK itself, when running in a VM with
>virtio interfaces, can be affected by this bug of the virtio PMD. A work-
>around until the bug is fixed could be to make sure mergeable rx buffers are
>enabled for the virtio ports in Qemu and vhost backend on the host, so that
>the virtio PMD does not use the faulty vector Rx function.

Yes, Tiwei and Kevin have expressed the same - I'll address these comments in v6.

>
>> +
>> +  Details regarding the virtio driver bug are available on the `DPDK
>mailing
>> +  list`_.
>> +
>> +.. _DPDK mailing list: http://dpdk.org/ml/archives/dev/2017-
>December/082801.html
>>
>>  Reporting Bugs
>>  --------------
>> diff --git a/Documentation/topics/dpdk/ring.rst
>b/Documentation/topics/dpdk/ring.rst
>> index ad9d7a5..8d0ede8 100644
>> --- a/Documentation/topics/dpdk/ring.rst
>> +++ b/Documentation/topics/dpdk/ring.rst
>> @@ -77,4 +77,4 @@ DPDK. However, this functionality was removed because:
>>  - :doc:`vhost-user interfaces <vhost-user>` are the defacto DPDK-based path
>to
>>    guests
>>
>> -.. _DPDK documentation:
>https://dpdk.readthedocs.io/en/v17.05/prog_guide/ring_lib.html
>> +.. _DPDK documentation:
>https://dpdk.readthedocs.io/en/v17.11/prog_guide/ring_lib.html
>> diff --git a/Documentation/topics/dpdk/vhost-user.rst
>b/Documentation/topics/dpdk/vhost-user.rst
>> index 74ac06e..1a5de24 100644
>> --- a/Documentation/topics/dpdk/vhost-user.rst
>> +++ b/Documentation/topics/dpdk/vhost-user.rst
>> @@ -287,6 +287,11 @@ application in the VM.
>>
>>    Support for DPDK in the guest requires QEMU >= 2.2
>>
>> +.. important::
>> +
>> +  DPDK v17.11 virtio PMD contains a bug that affects testpmd/DPDK guest
>> +  applications. As such, guests should not upgrade to 17.11.
>
>If such a temporary bug warning is really wanted here, it needs to be more
>qualified.

Sure - I'll add additional detail in the next version.
diff mbox series

Patch

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 4d6459f..ed28ee4 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -81,7 +81,7 @@  fi
 
 if [ "$DPDK" ]; then
     if [ -z "$DPDK_VER" ]; then
-        DPDK_VER="17.05.2"
+        DPDK_VER="17.11"
     fi
     install_dpdk $DPDK_VER
     if [ "$CC" = "clang" ]; then
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index d903b06..62a1957 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -164,6 +164,7 @@  Q: What DPDK version does each Open vSwitch release work with?
     2.6.x        16.07.2
     2.7.x        16.11.3
     2.8.x        17.05.2
+    2.9.x        17.11
     ============ =======
 
 Q: I get an error like this when I configure Open vSwitch:
diff --git a/Documentation/intro/install/dpdk.rst b/Documentation/intro/install/dpdk.rst
index bb69ae5..8c036dc 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -40,7 +40,7 @@  Build requirements
 In addition to the requirements described in :doc:`general`, building Open
 vSwitch with DPDK will require the following:
 
-- DPDK 17.05.2
+- DPDK 17.11
 
 - A `DPDK supported NIC`_
 
@@ -69,9 +69,9 @@  Install DPDK
 #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
 
        $ cd /usr/src/
-       $ wget http://fast.dpdk.org/rel/dpdk-17.05.2.tar.xz
-       $ tar xf dpdk-17.05.2.tar.xz
-       $ export DPDK_DIR=/usr/src/dpdk-stable-17.05.2
+       $ wget http://fast.dpdk.org/rel/dpdk-17.11.tar.xz
+       $ tar xf dpdk-17.11.tar.xz
+       $ export DPDK_DIR=/usr/src/dpdk-17.11
        $ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
@@ -583,7 +583,21 @@  Limitations
   The latest list of validated firmware versions can be found in the `DPDK
   release notes`_.
 
-.. _DPDK release notes: http://dpdk.org/doc/guides/rel_notes/release_17_05.html
+.. _DPDK release notes: http://dpdk.org/doc/guides/rel_notes/release_17_11.html
+
+- The DPDK v17.11 virtio net driver contains a bug that prevents guest DPDK
+  applications from receiving packets. This only occurs when guest-bound traffic
+  is live before a DPDK application is started within the guest, and where two
+  or more forwarding cores are used. As such, it is not recommended for guests
+  which execute DPDK applications to upgrade to DPDK v17.11.
+
+  Note that this issue does not occur when guest network devices are controlled
+  by the guest kernel.
+
+  Details regarding the virtio driver bug are available on the `DPDK mailing
+  list`_.
+
+.. _DPDK mailing list: http://dpdk.org/ml/archives/dev/2017-December/082801.html
 
 Reporting Bugs
 --------------
diff --git a/Documentation/topics/dpdk/ring.rst b/Documentation/topics/dpdk/ring.rst
index ad9d7a5..8d0ede8 100644
--- a/Documentation/topics/dpdk/ring.rst
+++ b/Documentation/topics/dpdk/ring.rst
@@ -77,4 +77,4 @@  DPDK. However, this functionality was removed because:
 - :doc:`vhost-user interfaces <vhost-user>` are the defacto DPDK-based path to
   guests
 
-.. _DPDK documentation: https://dpdk.readthedocs.io/en/v17.05/prog_guide/ring_lib.html
+.. _DPDK documentation: https://dpdk.readthedocs.io/en/v17.11/prog_guide/ring_lib.html
diff --git a/Documentation/topics/dpdk/vhost-user.rst b/Documentation/topics/dpdk/vhost-user.rst
index 74ac06e..1a5de24 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -287,6 +287,11 @@  application in the VM.
 
   Support for DPDK in the guest requires QEMU >= 2.2
 
+.. important::
+
+  DPDK v17.11 virtio PMD contains a bug that affects testpmd/DPDK guest
+  applications. As such, guests should not upgrade to 17.11.
+
 To begin, instantiate a guest as described in :ref:`dpdk-vhost-user` or
 :ref:`dpdk-vhost-user-client`. Once started, connect to the VM, download the
 DPDK sources to VM and build DPDK::
diff --git a/NEWS b/NEWS
index 427c8f8..d4a1c9a 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@  Post-v2.8.0
      * ovn-ctl: New commands run_nb_ovsdb and run_sb_ovsdb.
    - Linux kernel 4.13
      * Add support for compiling OVS with the latest Linux 4.13 kernel
+   - DPDK:
+     * Add support for DPDK v17.11
 
 v2.8.0 - 31 Aug 2017
 --------------------
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index faff842..f552444 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -26,6 +26,7 @@ 
 #include <sys/socket.h>
 #include <linux/if.h>
 
+#include <rte_bus_pci.h>
 #include <rte_config.h>
 #include <rte_cycles.h>
 #include <rte_errno.h>
@@ -140,8 +141,8 @@  static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
 
 #define DPDK_ETH_PORT_ID_INVALID    RTE_MAX_ETHPORTS
 
-/* DPDK library uses uint8_t for port_id. */
-typedef uint8_t dpdk_port_t;
+/* DPDK library uses uint16_t for port_id. */
+typedef uint16_t dpdk_port_t;
 
 #define VHOST_ENQ_RETRY_NUM 8
 #define IF_NAME_SZ (PATH_MAX > IFNAMSIZ ? PATH_MAX : IFNAMSIZ)