Skip to content

Commit

Permalink
dpdk: Update to use DPDK 19.11.
Browse files Browse the repository at this point in the history
This commit adds support for DPDK v19.11, it includes the following
changes.

1. travis: Enable compilation and linkage with dpdk 19.11.

2. sparse: Remove dpdk network headers copies.

   https://patchwork.ozlabs.org/patch/1185256/

3. dpdk: Migrate to new PDUMP API.

   https://patchwork.ozlabs.org/patch/1192971/

4. netdev-dpdk: Prefix network structures with rte_.

   https://patchwork.ozlabs.org/patch/1109733/

5. netdev-dpdk: Update by new color definitions.

   https://patchwork.ozlabs.org/patch/1086089/

6. docs: Update docs to reference 19.11.

7. docs: Add note regarding hotplug and igb_uio requirements.

For credit all authors of the original commits to 'dpdk-latest' with the
above changes been added as co-authors for this commmit.

Signed-off-by: David Marchand <[email protected]>
Co-authored-by: David Marchand <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
Co-authored-by: Ilya Maximets <[email protected]>
Signed-off-by: Ophir Munk <[email protected]>
Co-authored-by: Ophir Munk <[email protected]>
Reviewed-by: David Marchand <[email protected]>
Acked-by: Ilya Maximets <[email protected]>
Acked-by: Kevin Traynor <[email protected]>
Signed-off-by: Ian Stokes <[email protected]>
  • Loading branch information
4 people committed Dec 4, 2019
1 parent 9bf871c commit 127b6a6
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 1,027 deletions.
2 changes: 1 addition & 1 deletion .travis/linux-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fi

if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
if [ -z "$DPDK_VER" ]; then
DPDK_VER="18.11.5"
DPDK_VER="19.11"
fi
install_dpdk $DPDK_VER
# Enable pdump support in OVS.
Expand Down
10 changes: 5 additions & 5 deletions Documentation/intro/install/dpdk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Build requirements
In addition to the requirements described in :doc:`general`, building Open
vSwitch with DPDK will require the following:

- DPDK 18.11.5
- DPDK 19.11

- A `DPDK supported NIC`_

Expand Down Expand Up @@ -71,9 +71,9 @@ Install DPDK
#. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::

$ cd /usr/src/
$ wget http://fast.dpdk.org/rel/dpdk-18.11.5.tar.xz
$ tar xf dpdk-18.11.5.tar.xz
$ export DPDK_DIR=/usr/src/dpdk-stable-18.11.5
$ wget https://fast.dpdk.org/rel/dpdk-19.11.tar.xz
$ tar xf dpdk-19.11.tar.xz
$ export DPDK_DIR=/usr/src/dpdk-19.11
$ cd $DPDK_DIR

#. (Optional) Configure DPDK as a shared library
Expand Down Expand Up @@ -673,7 +673,7 @@ Limitations
release notes`_.

.. _DPDK release notes:
https://doc.dpdk.org/guides/rel_notes/release_18_11.html
https://doc.dpdk.org/guides-19.11/rel_notes/release_19_11.html

- Upper bound MTU: DPDK device drivers differ in how the L2 frame for a
given MTU value is calculated e.g. i40e driver includes 2 x vlan headers in
Expand Down
13 changes: 7 additions & 6 deletions Documentation/topics/dpdk/pdump.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,21 @@ To use pdump, simply launch OVS as usual, then navigate to the ``app/pdump``
directory in DPDK, ``make`` the application and run like so::

$ sudo ./build/app/dpdk-pdump -- \
--pdump port=0,queue=0,rx-dev=/tmp/pkts.pcap \
--server-socket-path=/usr/local/var/run/openvswitch
--pdump port=0,queue=0,rx-dev=/tmp/pkts.pcap

The above command captures traffic received on queue 0 of port 0 and stores it
in ``/tmp/pkts.pcap``. Other combinations of port numbers, queues numbers and
pcap locations are of course also available to use. For example, to capture all
packets that traverse port 0 in a single pcap file::

$ sudo ./build/app/dpdk-pdump -- \
--pdump 'port=0,queue=*,rx-dev=/tmp/pkts.pcap,tx-dev=/tmp/pkts.pcap' \
--server-socket-path=/usr/local/var/run/openvswitch
--pdump 'port=0,queue=*,rx-dev=/tmp/pkts.pcap,tx-dev=/tmp/pkts.pcap'

``server-socket-path`` must be set to the value of ``ovs_rundir()`` which
typically resolves to ``/usr/local/var/run/openvswitch``.
.. note::

``XDG_RUNTIME_DIR`` environment variable might need to be adjusted to
OVS runtime directory (``/var/run/openvswitch`` in most cases) for
``dpdk-pdump`` utility if OVS started by non-root user.

Many tools are available to view the contents of the pcap file. Once example is
tcpdump. Issue the following command to view the contents of ``pkts.pcap``::
Expand Down
27 changes: 24 additions & 3 deletions Documentation/topics/dpdk/phy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,30 @@ If the log is not seen then the port can be detached like so::
to be an example of this behavior; check the driver documentation if this
is suspected.

For more information please refer to the `DPDK Port Hotplug Framework`__.
Hotplugging with IGB_UIO
~~~~~~~~~~~~~~~~~~~~~~~~

__ http://dpdk.org/doc/guides/prog_guide/port_hotplug_framework.html#hotplug
As of DPDK 19.11, default igb_uio hotplugging behavior changes from
previous DPDK versions.

With DPDK 19.11, if no device is bound to igb_uio when OVS is launched then
the IOVA mode may be set to virtual addressing for DPDK. This is incompatible
for hotplugging with igb_uio.

To hotplug a port with igb_uio in this case, DPDK must be configured to use
physical addressing for IOVA mode. For more information regarding IOVA modes
in DPDK please refer to the `DPDK IOVA Mode Detection`__.

__ https://doc.dpdk.org/guides-19.11/prog_guide/env_abstraction_layer.html#iova-mode-detection

To configure OVS DPDK to use physical addressing for IOVA::

$ ovs-vsctl --no-wait set Open_vSwitch . \
other_config:dpdk-extra="--iova-mode=pa"

.. note::

Changing IOVA mode requires restarting the ovs-vswitchd application.

.. _representors:

Expand All @@ -240,7 +261,7 @@ Representors are multi devices created on top of one PF.

For more information, refer to the `DPDK documentation`__.

__ https://doc.dpdk.org/guides-18.11/prog_guide/switch_representation.html
__ https://doc.dpdk.org/guides-19.11/prog_guide/switch_representation.html

Prior to port representors there was a one-to-one relationship between the PF
and the eth device. With port representors the relationship becomes one PF to
Expand Down
2 changes: 1 addition & 1 deletion Documentation/topics/dpdk/ring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ DPDK. However, this functionality was removed because:
guests

.. _DPDK documentation:
https://doc.dpdk.org/guides-18.11/prog_guide/ring_lib.html
https://doc.dpdk.org/guides-19.11/prog_guide/ring_lib.html
8 changes: 4 additions & 4 deletions Documentation/topics/dpdk/vhost-user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,9 @@ To begin, instantiate a guest as described in :ref:`dpdk-vhost-user` or
DPDK sources to VM and build DPDK::

$ cd /root/dpdk/
$ wget http://fast.dpdk.org/rel/dpdk-18.11.5.tar.xz
$ tar xf dpdk-18.11.5.tar.xz
$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.5
$ wget https://fast.dpdk.org/rel/dpdk-19.11.tar.xz
$ tar xf dpdk-19.11.tar.xz
$ export DPDK_DIR=/root/dpdk/dpdk-19.11
$ export DPDK_TARGET=x86_64-native-linuxapp-gcc
$ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
$ cd $DPDK_DIR
Expand Down Expand Up @@ -622,4 +622,4 @@ Because of this limitation, this feature is considered 'experimental'.

Further information can be found in the
`DPDK documentation
<https://doc.dpdk.org/guides-18.11/prog_guide/vhost_lib.html>`__
<https://doc.dpdk.org/guides-19.11/prog_guide/vhost_lib.html>`__
4 changes: 2 additions & 2 deletions Documentation/topics/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,13 @@ They do require proper DPDK variables (``DPDK_DIR`` and ``DPDK_BUILD``).
Moreover you need to have root privileges to load the required modules and to bind
the NIC to the DPDK-compatible driver.

.. _DPDK supported NIC: http://dpdk.org/doc/nics
.. _DPDK supported NIC: https://core.dpdk.org/supported/#nics

All tests are skipped if no hugepages are configured. User must look into the DPDK
manual to figure out how to `Configure hugepages`_.
The phy test will skip if no compatible physical device is available.

.. _Configure hugepages: http://doc.dpdk.org/guides/linux_gsg/sys_reqs.html
.. _Configure hugepages: https://doc.dpdk.org/guides-19.11/linux_gsg/sys_reqs.html

All the features documented under `Unit Tests`_ are available for the DPDK
datapath testsuite.
Expand Down
3 changes: 1 addition & 2 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ Post-v2.12.0
* DPDK pdump support is deprecated and will be removed in next releases.
* DPDK ring ports (dpdkr) are deprecated and will be removed in next
releases.
* OVS validated with DPDK 18.11.5, due to the inclusion of a fix for
CVE-2019-14818, this DPDK version is strongly recommended to be used.
* Add support for DPDK 19.11.

v2.12.0 - 03 Sep 2019
---------------------
Expand Down
6 changes: 0 additions & 6 deletions include/sparse/automake.mk
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
noinst_HEADERS += \
include/sparse/rte_byteorder.h \
include/sparse/rte_esp.h \
include/sparse/rte_icmp.h \
include/sparse/rte_ip.h \
include/sparse/rte_sctp.h \
include/sparse/rte_tcp.h \
include/sparse/rte_udp.h \
include/sparse/xmmintrin.h \
include/sparse/arpa/inet.h \
include/sparse/bits/floatn.h \
Expand Down
65 changes: 0 additions & 65 deletions include/sparse/rte_esp.h

This file was deleted.

106 changes: 0 additions & 106 deletions include/sparse/rte_icmp.h

This file was deleted.

Loading

0 comments on commit 127b6a6

Please sign in to comment.