[ovs-dev] [PATCH v4] dpdk: Update to use v22.11.1.

2022-12-05 Thread Ian Stokes
This commit add support to for DPDK v22.11.1, it includes the following
changes.

1. ci: Reduce DPDK compilation time.
2. system-dpdk: Update vhost tests to be compatible with DPDK 22.07.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=316528

3. system-dpdk: Update vhost tests to be compatible with DPDK 22.07.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=311332

4. netdev-dpdk: Report device bus specific information.
5. netdev-dpdk: Drop reference to Rx header split.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=321808

In addition documentation was also updated in this commit for use with
DPDK v22.11.1.

The Debian shared DPDK compilation test is removed as part of this patch
due to a packaging requirement. Once DPDK v22.11.1 is available in Debian
repositories it should be re-enabled in OVS.

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

Signed-off-by: David Marchand 
Co-authored-by: David Marchand 
Signed-off-by: Sunil Pai G 
Co-authored-by: Sunil Pai G 
Signed-off-by: Ian Stokes 

---
v3 -> v4
* Rebase to master.
* Update to use DPDK v22.11.1
* Update missed documentation mentioned by David.
* Remove Debian shared DPDK test in test matrix.

v2 -> v3
* Remove RFC status.
* Update debian control to use 22.11.

v1 -> v2
* Updated to use DPDK 22.11 rc4.

* Please Note: Although DPDK documentation has been updated in this patch
the resource has not been updated on the DPDK site as of yet, this will
be expected as part of DPDK 22.11 final release.

* The GitHub actions 'linux deb shared dpdk' is expected to fail with this
patch as DPDK 22.11 is not part of the package structure yet.
---
 .ci/linux-build.sh   |  7 ++-
 .github/workflows/build-and-test.yml |  1 -
 Documentation/faq/releases.rst   |  2 +-
 Documentation/intro/install/dpdk.rst | 16 +++
 Documentation/topics/dpdk/phy.rst|  8 ++--
 Documentation/topics/dpdk/vdev.rst   |  2 +-
 Documentation/topics/dpdk/vhost-user.rst |  2 +-
 Documentation/topics/testing.rst |  2 +-
 Documentation/topics/userspace-tso.rst   |  2 +-
 NEWS | 18 +---
 debian/control.in|  2 +-
 lib/netdev-dpdk.c| 24 --
 rhel/openvswitch-fedora.spec.in  |  2 +-
 tests/system-dpdk.at | 78 
 14 files changed, 73 insertions(+), 93 deletions(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 23c8bbb7a..485109672 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -160,6 +160,11 @@ function install_dpdk()
 # meson verbose outputs.
 DPDK_OPTS="$DPDK_OPTS -Ddeveloper_mode=disabled"
 
+# OVS compilation and "normal" unit tests (run in the CI) do not depend on
+# any DPDK driver being present.
+# We can disable all drivers to save compilation time.
+DPDK_OPTS="$DPDK_OPTS -Ddisable_drivers=*/*"
+
 # Install DPDK using prefix.
 DPDK_OPTS="$DPDK_OPTS --prefix=$(pwd)/build"
 
@@ -228,7 +233,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="21.11.2"
+DPDK_VER="22.11.1"
 fi
 install_dpdk $DPDK_VER
 fi
diff --git a/.github/workflows/build-and-test.yml 
b/.github/workflows/build-and-test.yml
index 7baa91403..e08d7b1ba 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -213,7 +213,6 @@ jobs:
   matrix:
 include:
   - dpdk: no
-  - dpdk: shared
 
 steps:
 - name: checkout
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index ac0001cd5..e19f54c8f 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -233,7 +233,7 @@ Q: Are all the DPDK releases that OVS versions work with 
maintained?
 The latest information about DPDK stable and LTS releases can be found
 at `DPDK stable`_.
 
-.. _DPDK stable: http://doc.dpdk.org/guides-21.11/contributing/stable.html
+.. _DPDK stable: http://doc.dpdk.org/guides-22.11/contributing/stable.html
 
 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 a284e6851..e360ee83d 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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 21.11.2
+- DPDK 22.11.1
 
 - A `DPDK supported NIC`_
 
@@ -59,8 +59,8 @@ vSwitch with DPDK will require the following:
 
 Detailed system requirements can be found at `DPDK requirements`_.
 
-.. _DPDK supported NIC: https://d

[ovs-dev] [PATCH v3] dpdk: Update to use v22.11.

2022-11-30 Thread Ian Stokes
This commit add support to for DPDK v22.11, it includes the following
changes.

1. ci: Reduce DPDK compilation time.
2. system-dpdk: Update vhost tests to be compatible with DPDK 22.07.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=316528

3. system-dpdk: Update vhost tests to be compatible with DPDK 22.07.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=311332

4. netdev-dpdk: Report device bus specific information.
5. netdev-dpdk: Drop reference to Rx header split.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=321808

In addition documentation was also updated in this commit for use with
DPDK v22.11.

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

Signed-off-by: David Marchand 
Co-authored-by: David Marchand 
Signed-off-by: Sunil Pai G 
Co-authored-by: Sunil Pai G 
Signed-off-by: Ian Stokes 

---
v2 -> v3
* Remove RFC status.
* Update debian control to use 22.11.

v1 -> v2
* Updated to use DPDK 22.11 rc4.

* Please Note: Although DPDK documentation has been updated in this patch
the resource has not been updated on the DPDK site as of yet, this will
be expected as part of DPDK 22.11 final release.

* The GitHub actions 'linux deb shared dpdk' is expected to fail with this
patch as DPDK 22.11 is not part of the package structure yet.
---
 .ci/linux-build.sh   |  7 ++-
 Documentation/faq/releases.rst   |  2 +-
 Documentation/intro/install/dpdk.rst | 16 +++---
 Documentation/topics/dpdk/phy.rst|  8 +--
 NEWS | 18 +--
 debian/control.in|  2 +-
 lib/netdev-dpdk.c| 24 +++--
 rhel/openvswitch-fedora.spec.in  |  2 +-
 tests/system-dpdk.at | 78 ++--
 9 files changed, 69 insertions(+), 88 deletions(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 23c8bbb7a..90eac5146 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -160,6 +160,11 @@ function install_dpdk()
 # meson verbose outputs.
 DPDK_OPTS="$DPDK_OPTS -Ddeveloper_mode=disabled"
 
+# OVS compilation and "normal" unit tests (run in the CI) do not depend on
+# any DPDK driver being present.
+# We can disable all drivers to save compilation time.
+DPDK_OPTS="$DPDK_OPTS -Ddisable_drivers=*/*"
+
 # Install DPDK using prefix.
 DPDK_OPTS="$DPDK_OPTS --prefix=$(pwd)/build"
 
@@ -228,7 +233,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="21.11.2"
+DPDK_VER="22.11"
 fi
 install_dpdk $DPDK_VER
 fi
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index ac0001cd5..e19f54c8f 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -233,7 +233,7 @@ Q: Are all the DPDK releases that OVS versions work with 
maintained?
 The latest information about DPDK stable and LTS releases can be found
 at `DPDK stable`_.
 
-.. _DPDK stable: http://doc.dpdk.org/guides-21.11/contributing/stable.html
+.. _DPDK stable: http://doc.dpdk.org/guides-22.11/contributing/stable.html
 
 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 a284e6851..2193efddc 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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 21.11.2
+- DPDK 22.11
 
 - A `DPDK supported NIC`_
 
@@ -59,8 +59,8 @@ vSwitch with DPDK will require the following:
 
 Detailed system requirements can be found at `DPDK requirements`_.
 
-.. _DPDK supported NIC: https://doc.dpdk.org/guides-21.11/nics/index.html
-.. _DPDK requirements: 
https://doc.dpdk.org/guides-21.11/linux_gsg/sys_reqs.html
+.. _DPDK supported NIC: https://doc.dpdk.org/guides-22.11/nics/index.html
+.. _DPDK requirements: 
https://doc.dpdk.org/guides-22.11/linux_gsg/sys_reqs.html
 
 .. _dpdk-install:
 
@@ -73,9 +73,9 @@ Install DPDK
 #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
 
$ cd /usr/src/
-   $ wget https://fast.dpdk.org/rel/dpdk-21.11.2.tar.xz
-   $ tar xf dpdk-21.11.2.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-21.11.2
+   $ wget https://fast.dpdk.org/rel/dpdk-22.11.tar.xz
+   $ tar xf dpdk-22.11.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-22.11
$ cd $DPDK_DIR
 
 #. Configure and install DPDK using Meson
@@ -121,7 +121,7 @@ Install DPDK
 
 .. _DPDK sources: http://dpdk.org/rel
 .. _DPDK documentation:
-   https://doc.dpdk.org/guides-21.11/linux_gsg/build_dpdk.html
+   https://doc.dpdk.org/guides-22.11/linux_

[ovs-dev] [RFC PATCH v2] dpdk: Update to use v22.11.

2022-11-23 Thread Ian Stokes
This commit add support to for DPDK v22.11, it includes the following
changes.

1. ci: Reduce DPDK compilation time.
2. system-dpdk: Update vhost tests to be compatible with DPDK 22.07.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=316528

3. system-dpdk: Update vhost tests to be compatible with DPDK 22.07.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=311332

4. netdev-dpdk: Report device bus specific information.
5. netdev-dpdk: Drop reference to Rx header split.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=321808

In addition documentation was also updated in this commit for use with
DPDK v22.11.

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

Signed-off-by: David Marchand 
Co-authored-by: David Marchand 
Signed-off-by: Sunil Pai G 
Co-authored-by: Sunil Pai G 
Signed-off-by: Ian Stokes 

---
v1 -> v2
* Updated to use DPDK 22.11 rc4.

* Please Note: Although DPDK documentation has been updated in this patch
the resource has not been updated on the DPDK site as of yet, this will
be expected as part of DPDK 22.11 final release.

* The GitHub actions 'linux deb shared dpdk' is expected to fail with this
patch as DPDK 22.11 is not part of the package structure yet.
---
 .ci/linux-build.sh   |  9 +++-
 Documentation/faq/releases.rst   |  2 +-
 Documentation/intro/install/dpdk.rst | 16 +++---
 Documentation/topics/dpdk/phy.rst|  8 +--
 NEWS | 18 +--
 lib/netdev-dpdk.c| 24 +++--
 rhel/openvswitch-fedora.spec.in  |  2 +-
 tests/system-dpdk.at | 78 ++--
 8 files changed, 69 insertions(+), 88 deletions(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 23c8bbb7a..0aa90e55e 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -142,7 +142,7 @@ function install_dpdk()
 fi
 # No cache or version mismatch.
 rm -rf dpdk-dir
-wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz
+wget https://git.dpdk.org/dpdk/snapshot/dpdk-$1.tar.xz
 tar xvf dpdk-$1.tar.xz > /dev/null
 DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/")
 mv ${DIR_NAME} dpdk-dir
@@ -160,6 +160,11 @@ function install_dpdk()
 # meson verbose outputs.
 DPDK_OPTS="$DPDK_OPTS -Ddeveloper_mode=disabled"
 
+# OVS compilation and "normal" unit tests (run in the CI) do not depend on
+# any DPDK driver being present.
+# We can disable all drivers to save compilation time.
+DPDK_OPTS="$DPDK_OPTS -Ddisable_drivers=*/*"
+
 # Install DPDK using prefix.
 DPDK_OPTS="$DPDK_OPTS --prefix=$(pwd)/build"
 
@@ -228,7 +233,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="21.11.2"
+DPDK_VER="22.11-rc4"
 fi
 install_dpdk $DPDK_VER
 fi
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index ac0001cd5..e19f54c8f 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -233,7 +233,7 @@ Q: Are all the DPDK releases that OVS versions work with 
maintained?
 The latest information about DPDK stable and LTS releases can be found
 at `DPDK stable`_.
 
-.. _DPDK stable: http://doc.dpdk.org/guides-21.11/contributing/stable.html
+.. _DPDK stable: http://doc.dpdk.org/guides-22.11/contributing/stable.html
 
 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 a284e6851..2193efddc 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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 21.11.2
+- DPDK 22.11
 
 - A `DPDK supported NIC`_
 
@@ -59,8 +59,8 @@ vSwitch with DPDK will require the following:
 
 Detailed system requirements can be found at `DPDK requirements`_.
 
-.. _DPDK supported NIC: https://doc.dpdk.org/guides-21.11/nics/index.html
-.. _DPDK requirements: 
https://doc.dpdk.org/guides-21.11/linux_gsg/sys_reqs.html
+.. _DPDK supported NIC: https://doc.dpdk.org/guides-22.11/nics/index.html
+.. _DPDK requirements: 
https://doc.dpdk.org/guides-22.11/linux_gsg/sys_reqs.html
 
 .. _dpdk-install:
 
@@ -73,9 +73,9 @@ Install DPDK
 #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
 
$ cd /usr/src/
-   $ wget https://fast.dpdk.org/rel/dpdk-21.11.2.tar.xz
-   $ tar xf dpdk-21.11.2.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-21.11.2
+   $ wget https://fast.dpdk.org/rel/dpdk-22.11.tar.xz
+   $ tar xf dpdk-22.11.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-

[ovs-dev] [RFC PATCH] dpdk: Update to use v22.11.

2022-11-16 Thread Ian Stokes
This commit add support to for DPDK v22.11, it includes the following
changes.

1. ci: Reduce DPDK compilation time.
2. system-dpdk: Update vhost tests to be compatible with DPDK 22.07.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=316528

3. system-dpdk: Update vhost tests to be compatible with DPDK 22.07.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=311332

4. netdev-dpdk: Report device bus specific information.
5. netdev-dpdk: Drop reference to Rx header split.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=321808

In addition documentation was also updated in this commit for use with
DPDK v22.11.

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

Signed-off-by: David Marchand 
Co-authored-by: David Marchand 
Signed-off-by: Sunil Pai G 
Co-authored-by: Sunil Pai G 
Signed-off-by: Ian Stokes 

---
1. Please Note: Although DPDK documentation has been updated in this patch
the resource has not been updated on the DPDK site as of yet, this will
be expected as part of DPDK RC4.
---
 .ci/linux-build.sh   |  9 -
 Documentation/faq/releases.rst   |  2 +-
 Documentation/intro/install/dpdk.rst | 16 
 Documentation/topics/dpdk/phy.rst|  8 ++--
 NEWS | 18 +
 lib/netdev-dpdk.c| 24 ---
 rhel/openvswitch-fedora.spec.in  |  2 +-
 tests/system-dpdk.at | 78 ++--
 8 files changed, 69 insertions(+), 88 deletions(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 23c8bbb7a..4a4dc0fb0 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -142,7 +142,7 @@ function install_dpdk()
 fi
 # No cache or version mismatch.
 rm -rf dpdk-dir
-wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz
+wget https://git.dpdk.org/dpdk/snapshot/dpdk-$1.tar.xz
 tar xvf dpdk-$1.tar.xz > /dev/null
 DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/")
 mv ${DIR_NAME} dpdk-dir
@@ -160,6 +160,11 @@ function install_dpdk()
 # meson verbose outputs.
 DPDK_OPTS="$DPDK_OPTS -Ddeveloper_mode=disabled"
 
+# OVS compilation and "normal" unit tests (run in the CI) do not depend on
+# any DPDK driver being present.
+# We can disable all drivers to save compilation time.
+DPDK_OPTS="$DPDK_OPTS -Ddisable_drivers=*/*"
+
 # Install DPDK using prefix.
 DPDK_OPTS="$DPDK_OPTS --prefix=$(pwd)/build"
 
@@ -228,7 +233,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="21.11.2"
+DPDK_VER="22.11-rc3"
 fi
 install_dpdk $DPDK_VER
 fi
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index ac0001cd5..e19f54c8f 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -233,7 +233,7 @@ Q: Are all the DPDK releases that OVS versions work with 
maintained?
 The latest information about DPDK stable and LTS releases can be found
 at `DPDK stable`_.
 
-.. _DPDK stable: http://doc.dpdk.org/guides-21.11/contributing/stable.html
+.. _DPDK stable: http://doc.dpdk.org/guides-22.11/contributing/stable.html
 
 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 a284e6851..2193efddc 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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 21.11.2
+- DPDK 22.11
 
 - A `DPDK supported NIC`_
 
@@ -59,8 +59,8 @@ vSwitch with DPDK will require the following:
 
 Detailed system requirements can be found at `DPDK requirements`_.
 
-.. _DPDK supported NIC: https://doc.dpdk.org/guides-21.11/nics/index.html
-.. _DPDK requirements: 
https://doc.dpdk.org/guides-21.11/linux_gsg/sys_reqs.html
+.. _DPDK supported NIC: https://doc.dpdk.org/guides-22.11/nics/index.html
+.. _DPDK requirements: 
https://doc.dpdk.org/guides-22.11/linux_gsg/sys_reqs.html
 
 .. _dpdk-install:
 
@@ -73,9 +73,9 @@ Install DPDK
 #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
 
$ cd /usr/src/
-   $ wget https://fast.dpdk.org/rel/dpdk-21.11.2.tar.xz
-   $ tar xf dpdk-21.11.2.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-21.11.2
+   $ wget https://fast.dpdk.org/rel/dpdk-22.11.tar.xz
+   $ tar xf dpdk-22.11.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-22.11
$ cd $DPDK_DIR
 
 #. Configure and install DPDK using Meson
@@ -121,7 +121,7 @@ Install DPDK
 
 .. _DPDK sources: http://dpdk.org/rel
 .. _DPDK documentation:
-   http

[ovs-dev] [PATCH] ci: Update meson requirement for DPDK.

2022-11-03 Thread Ian Stokes
The current version of meson used for building DPDK is 0.49.2.

This has the restriction of holding the required python version to 3.9.

A recent change [1] in DPDK bumped requirements on meson to 0.53.2.

Update the version of meson used to build DPDK to 0.53.2 to remove the
restriction.

[1] https://git.dpdk.org/dpdk/commit/?id=909ad7b80e5e

Signed-off-by: Ian Stokes 
Reviewed-by: David Marchand 
---
 .ci/linux-prepare.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.ci/linux-prepare.sh b/.ci/linux-prepare.sh
index 16a7aec0b..11d75a6d5 100755
--- a/.ci/linux-prepare.sh
+++ b/.ci/linux-prepare.sh
@@ -27,7 +27,7 @@ cd ..
 pip3 install --disable-pip-version-check --user wheel
 pip3 install --disable-pip-version-check --user \
 flake8 'hacking>=3.0' netaddr pyparsing sphinx setuptools pyelftools
-pip3 install --user  'meson==0.49.2'
+pip3 install --user  'meson==0.53.2'
 
 if [ "$M32" ]; then
 # Installing 32-bit libraries.
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH dpdk-latest] ci: Update meson requirement for DPDK 22.11.

2022-11-02 Thread Ian Stokes
A recent change [1] in DPDK bumped requirements on meson to 0.53.2.

[1] https://git.dpdk.org/dpdk/commit/?id=909ad7b80e5e

Signed-off-by: Ian Stokes 
---
 .ci/linux-prepare.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.ci/linux-prepare.sh b/.ci/linux-prepare.sh
index 16a7aec0b..11d75a6d5 100755
--- a/.ci/linux-prepare.sh
+++ b/.ci/linux-prepare.sh
@@ -27,7 +27,7 @@ cd ..
 pip3 install --disable-pip-version-check --user wheel
 pip3 install --disable-pip-version-check --user \
 flake8 'hacking>=3.0' netaddr pyparsing sphinx setuptools pyelftools
-pip3 install --user  'meson==0.49.2'
+pip3 install --user  'meson==0.53.2'
 
 if [ "$M32" ]; then
 # Installing 32-bit libraries.
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2 1/1] dpdk: Update to use DPDK v21.11.

2021-12-09 Thread Ian Stokes
This commit adds support for DPDK v21.11, it includes the following
changes.

1. ci: Install python elftools for DPDK 21.02.
2. ci: Update meson requirement for DPDK 21.05.
3. netdev-dpdk: Fix build with 21.05.
4. ci: Compile DPDK in non developer mode.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=242480=*

5. netdev-dpdk: Remove access to DPDK internals.
6. netdev-dpdk: Remove unused attribute from rte_flow rule.
7. netdev-dpdk: Fix mbuf macros namespace with 21.11-rc1.
8. netdev-dpdk: Fix vhost namespace with 21.11-rc2.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=271040=*

In addition documentaion and DPDK unit tests were also updated in this
commit for use with DPDK v21.11.

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

Signed-off-by: David Marchand 
Co-authored-by: David Marchand 
Reviewed-by: Maxime Coquelin 
Signed-off-by: Ian Stokes 

---
v1 -> v2
* Modified openvswitch-fedora.spec.in instead of generated files.

RFC -> V1
* Add telemetry warning to OVS DPDK unit tests.
* Update TSO documentation link to 21.11.
* Update fedora spec to use 21.11.
---
 .ci/linux-build.sh   |   6 +-
 .ci/linux-prepare.sh |   4 +-
 Documentation/faq/releases.rst   |   2 +-
 Documentation/intro/install/dpdk.rst |  16 ++---
 Documentation/topics/dpdk/phy.rst|   8 +--
 Documentation/topics/dpdk/vdev.rst   |   2 +-
 Documentation/topics/dpdk/vhost-user.rst |   2 +-
 Documentation/topics/testing.rst |   2 +-
 Documentation/topics/userspace-tso.rst   |   2 +-
 NEWS |   1 +
 lib/dp-packet.h  |  26 +++
 lib/netdev-dpdk.c| 115 ---
 rhel/openvswitch-fedora.spec.in  |   2 +-
 tests/system-dpdk.at |  16 +++--
 14 files changed, 110 insertions(+), 94 deletions(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 863f02388..ff6ae4b10 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -159,6 +159,10 @@ function install_dpdk()
 # Disable building DPDK unit tests. Not needed for OVS build or tests.
 DPDK_OPTS="$DPDK_OPTS -Dtests=false"
 
+# Disable DPDK developer mode, this results in less build checks and less
+# meson verbose outputs.
+DPDK_OPTS="$DPDK_OPTS -Ddeveloper_mode=disabled"
+
 # Install DPDK using prefix.
 DPDK_OPTS="$DPDK_OPTS --prefix=$(pwd)/build"
 
@@ -216,7 +220,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="20.11.1"
+DPDK_VER="21.11"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/.ci/linux-prepare.sh b/.ci/linux-prepare.sh
index 360c0a68e..b3addf404 100755
--- a/.ci/linux-prepare.sh
+++ b/.ci/linux-prepare.sh
@@ -21,8 +21,8 @@ make -j4 HAVE_LLVM= HAVE_SQLITE= install
 cd ..
 
 pip3 install --disable-pip-version-check --user \
-flake8 hacking sphinx wheel setuptools
-pip3 install --user  'meson==0.47.1'
+flake8 hacking sphinx wheel setuptools pyelftools
+pip3 install --user  'meson==0.49.2'
 
 if [ "$M32" ]; then
 # Installing 32-bit libraries.
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index 64bc577e0..59d55202d 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -225,7 +225,7 @@ Q: Are all the DPDK releases that OVS versions work with 
maintained?
 The latest information about DPDK stable and LTS releases can be found
 at `DPDK stable`_.
 
-.. _DPDK stable: http://doc.dpdk.org/guides-20.11/contributing/stable.html
+.. _DPDK stable: http://doc.dpdk.org/guides-21.11/contributing/stable.html
 
 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 d554409fc..d9f44055d 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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 20.11.1
+- DPDK 21.11
 
 - A `DPDK supported NIC`_
 
@@ -59,8 +59,8 @@ vSwitch with DPDK will require the following:
 
 Detailed system requirements can be found at `DPDK requirements`_.
 
-.. _DPDK supported NIC: https://doc.dpdk.org/guides-20.11/nics/index.html
-.. _DPDK requirements: 
https://doc.dpdk.org/guides-20.11/linux_gsg/sys_reqs.html
+.. _DPDK supported NIC: https://doc.dpdk.org/guides-21.11/nics/index.html
+.. _DPDK requirements: 
https://doc.dpdk.org/guides-21.11/linux_gsg/sys_reqs.html
 
 .. _dpdk-install:
 
@@ -73,9 +73,9 @@ Install DPDK
 #. Download the `DPDK sources`_, extract the file and set `

[ovs-dev] [PATCH v1 1/1] dpdk: Update to use DPDK v21.11.

2021-12-09 Thread Ian Stokes
This commit adds support for DPDK v21.11, it includes the following
changes.

1. ci: Install python elftools for DPDK 21.02.
2. ci: Update meson requirement for DPDK 21.05.
3. netdev-dpdk: Fix build with 21.05.
4. ci: Compile DPDK in non developer mode.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=242480=*

5. netdev-dpdk: Remove access to DPDK internals.
6. netdev-dpdk: Remove unused attribute from rte_flow rule.
7. netdev-dpdk: Fix mbuf macros namespace with 21.11-rc1.
8. netdev-dpdk: Fix vhost namespace with 21.11-rc2.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=271040=*

In addition documentaion and DPDK unit tests were also updated in this
commit for use with DPDK v21.11.

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

Signed-off-by: David Marchand 
Co-authored-by: David Marchand 
Reviewed-by: Maxime Coquelin 
Signed-off-by: Ian Stokes 

---
RFC -> V1
* Add telemetry warning to OVS DPDK unit tests.
* Update TSO documentation link to 21.11.
* Update fedora spec to use 21.11.
---
 .ci/linux-build.sh   |   6 +-
 .ci/linux-prepare.sh |   4 +-
 Documentation/faq/releases.rst   |   2 +-
 Documentation/intro/install/dpdk.rst |  16 +-
 Documentation/topics/dpdk/phy.rst|   8 +-
 Documentation/topics/dpdk/vdev.rst   |   2 +-
 Documentation/topics/dpdk/vhost-user.rst |   2 +-
 Documentation/topics/testing.rst |   2 +-
 Documentation/topics/userspace-tso.rst   |   2 +-
 NEWS |   1 +
 lib/dp-packet.h  |  26 +-
 lib/netdev-dpdk.c| 115 +++
 rhel/openvswitch-fedora.spec | 515 +++
 tests/system-dpdk.at |  16 +-
 14 files changed, 624 insertions(+), 93 deletions(-)
 create mode 100644 rhel/openvswitch-fedora.spec

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 863f02388..ff6ae4b10 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -159,6 +159,10 @@ function install_dpdk()
 # Disable building DPDK unit tests. Not needed for OVS build or tests.
 DPDK_OPTS="$DPDK_OPTS -Dtests=false"
 
+# Disable DPDK developer mode, this results in less build checks and less
+# meson verbose outputs.
+DPDK_OPTS="$DPDK_OPTS -Ddeveloper_mode=disabled"
+
 # Install DPDK using prefix.
 DPDK_OPTS="$DPDK_OPTS --prefix=$(pwd)/build"
 
@@ -216,7 +220,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="20.11.1"
+DPDK_VER="21.11"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/.ci/linux-prepare.sh b/.ci/linux-prepare.sh
index 360c0a68e..b3addf404 100755
--- a/.ci/linux-prepare.sh
+++ b/.ci/linux-prepare.sh
@@ -21,8 +21,8 @@ make -j4 HAVE_LLVM= HAVE_SQLITE= install
 cd ..
 
 pip3 install --disable-pip-version-check --user \
-flake8 hacking sphinx wheel setuptools
-pip3 install --user  'meson==0.47.1'
+flake8 hacking sphinx wheel setuptools pyelftools
+pip3 install --user  'meson==0.49.2'
 
 if [ "$M32" ]; then
 # Installing 32-bit libraries.
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index 64bc577e0..59d55202d 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -225,7 +225,7 @@ Q: Are all the DPDK releases that OVS versions work with 
maintained?
 The latest information about DPDK stable and LTS releases can be found
 at `DPDK stable`_.
 
-.. _DPDK stable: http://doc.dpdk.org/guides-20.11/contributing/stable.html
+.. _DPDK stable: http://doc.dpdk.org/guides-21.11/contributing/stable.html
 
 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 d554409fc..d9f44055d 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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 20.11.1
+- DPDK 21.11
 
 - A `DPDK supported NIC`_
 
@@ -59,8 +59,8 @@ vSwitch with DPDK will require the following:
 
 Detailed system requirements can be found at `DPDK requirements`_.
 
-.. _DPDK supported NIC: https://doc.dpdk.org/guides-20.11/nics/index.html
-.. _DPDK requirements: 
https://doc.dpdk.org/guides-20.11/linux_gsg/sys_reqs.html
+.. _DPDK supported NIC: https://doc.dpdk.org/guides-21.11/nics/index.html
+.. _DPDK requirements: 
https://doc.dpdk.org/guides-21.11/linux_gsg/sys_reqs.html
 
 .. _dpdk-install:
 
@@ -73,9 +73,9 @@ Install DPDK
 #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
 
   

[ovs-dev] [RFC PATCH 1/1] dpdk: Update to use DPDK v21.11.

2021-11-30 Thread Ian Stokes
This commit adds support for DPDK v21.11, it includes the following
changes.

1. ci: Install python elftools for DPDK 21.02.
2. ci: Update meson requirement for DPDK 21.05.
3. netdev-dpdk: Fix build with 21.05.
4. ci: Compile DPDK in non developer mode.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=242480=*

5. netdev-dpdk: Remove access to DPDK internals.
6. netdev-dpdk: Remove unused attribute from rte_flow rule.
7. netdev-dpdk: Fix mbuf macros namespace with 21.11-rc1.
8. netdev-dpdk: Fix vhost namespace with 21.11-rc2.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=271040=*

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

Signed-off-by: David Marchand 
Co-authored-by: David Marchand 
Signed-off-by: Ian Stokes 
---
 .ci/linux-build.sh   |   6 +-
 .ci/linux-prepare.sh |   4 +-
 Documentation/faq/releases.rst   |   2 +-
 Documentation/intro/install/dpdk.rst |  16 ++---
 Documentation/topics/dpdk/phy.rst|   8 +--
 Documentation/topics/dpdk/vdev.rst   |   2 +-
 Documentation/topics/dpdk/vhost-user.rst |   2 +-
 Documentation/topics/testing.rst |   2 +-
 NEWS |   1 +
 lib/dp-packet.h  |  26 +++
 lib/netdev-dpdk.c| 115 ---
 11 files changed, 98 insertions(+), 86 deletions(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 863f02388..ff6ae4b10 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -159,6 +159,10 @@ function install_dpdk()
 # Disable building DPDK unit tests. Not needed for OVS build or tests.
 DPDK_OPTS="$DPDK_OPTS -Dtests=false"
 
+# Disable DPDK developer mode, this results in less build checks and less
+# meson verbose outputs.
+DPDK_OPTS="$DPDK_OPTS -Ddeveloper_mode=disabled"
+
 # Install DPDK using prefix.
 DPDK_OPTS="$DPDK_OPTS --prefix=$(pwd)/build"
 
@@ -216,7 +220,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="20.11.1"
+DPDK_VER="21.11"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/.ci/linux-prepare.sh b/.ci/linux-prepare.sh
index 360c0a68e..b3addf404 100755
--- a/.ci/linux-prepare.sh
+++ b/.ci/linux-prepare.sh
@@ -21,8 +21,8 @@ make -j4 HAVE_LLVM= HAVE_SQLITE= install
 cd ..
 
 pip3 install --disable-pip-version-check --user \
-flake8 hacking sphinx wheel setuptools
-pip3 install --user  'meson==0.47.1'
+flake8 hacking sphinx wheel setuptools pyelftools
+pip3 install --user  'meson==0.49.2'
 
 if [ "$M32" ]; then
 # Installing 32-bit libraries.
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index 64bc577e0..59d55202d 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -225,7 +225,7 @@ Q: Are all the DPDK releases that OVS versions work with 
maintained?
 The latest information about DPDK stable and LTS releases can be found
 at `DPDK stable`_.
 
-.. _DPDK stable: http://doc.dpdk.org/guides-20.11/contributing/stable.html
+.. _DPDK stable: http://doc.dpdk.org/guides-21.11/contributing/stable.html
 
 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 d554409fc..d9f44055d 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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 20.11.1
+- DPDK 21.11
 
 - A `DPDK supported NIC`_
 
@@ -59,8 +59,8 @@ vSwitch with DPDK will require the following:
 
 Detailed system requirements can be found at `DPDK requirements`_.
 
-.. _DPDK supported NIC: https://doc.dpdk.org/guides-20.11/nics/index.html
-.. _DPDK requirements: 
https://doc.dpdk.org/guides-20.11/linux_gsg/sys_reqs.html
+.. _DPDK supported NIC: https://doc.dpdk.org/guides-21.11/nics/index.html
+.. _DPDK requirements: 
https://doc.dpdk.org/guides-21.11/linux_gsg/sys_reqs.html
 
 .. _dpdk-install:
 
@@ -73,9 +73,9 @@ Install DPDK
 #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
 
$ cd /usr/src/
-   $ wget https://fast.dpdk.org/rel/dpdk-20.11.1.tar.xz
-   $ tar xf dpdk-20.11.1.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-20.11.1
+   $ wget https://fast.dpdk.org/rel/dpdk-21.11.tar.xz
+   $ tar xf dpdk-21.11.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-21.11
$ cd $DPDK_DIR
 
 #. Configure and install DPDK using Meson
@@ -121,7 +121,7 @@ Install DPDK
 
 .. _DPDK sources: http://dpdk.org/rel
 .. _DPDK documentation:
-

[ovs-dev] [PATCH v1 branch-2.13 2/2] acinclude: Strip out -mno-avx512f provided by DPDK.

2021-01-15 Thread Ian Stokes
DPDK forces '-mno-avx512f' flag for the application if the toolchain
used to build DPDK had broken AVX512 support.

DPDK forces '-mno-avx512f' flag for the application if the toolchain
used to build DPDK had broken AVX512 support.  But OVS could be built
with a completely different or fixed toolchain with correct avx512
support.

Fix that by stripping out `-mno-avx512f` as we already do for '-march'.
This will allow the OVS to decide if the AVX512 can be used.

Reordering of CFLAGS (i.e. adding DPDK flags before OVS ones) is not an
option since autotools might reorder them back later and it's very
unpredictable.

Reported-at: openvswitch/ovs-issues#201
Signed-off-by: Ilya Maximets 
Co-authored-by: Ilya Maximets 
Signed-off-by: Ian Stokes 
---
 acinclude.m4 | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 9922c69b0..4033e28eb 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -433,7 +433,13 @@ AC_DEFUN([OVS_CHECK_DPDK], [
 fi
 # Force in pkg-config since this could override user-specified options.
 # It's enough to have -mssse3 to build with DPDK headers.
-DPDK_INCLUDE=$(echo "$DPDK_INCLUDE" | sed 's/-march=[[^ ]]*//g')
+DPDK_INCLUDE=$(echo "$DPDK_INCLUDE" | sed 's/-march=[[^ ]]*//g'
+# Also stripping out '-mno-avx512f'.  Support for AVX512 will be disabled
+# if OVS will detect that it's broken.  OVS could be built with a
+# completely different toolchain that correctly supports AVX512, flags
+# forced by DPDK only breaks our feature detection mechanism and leads to
+# build failures: https://github.com/openvswitch/ovs-issues/issues/201
+DPDK_INCLUDE=$(echo "$DPDK_INCLUDE" | sed 's/-mno-avx512f//g'))
 OVS_CFLAGS="$OVS_CFLAGS $DPDK_INCLUDE"
 OVS_ENABLE_OPTION([-mssse3])
 
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v1 branch-2.13 1/2] acinclude: Strip out -march provided by DPDK.

2021-01-15 Thread Ian Stokes
DPDK flags may include -march. Forcing -march could be
considered too heavy a requirement when users compile OVS from
source and could override user provided options.

Resolve this by stripping -march from provided DPDK flags.

Signed-off-by: Ian Stokes 
---
 acinclude.m4 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/acinclude.m4 b/acinclude.m4
index 12fd6c4a5..9922c69b0 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -431,6 +431,9 @@ AC_DEFUN([OVS_CHECK_DPDK], [
 if test "$DPDK_AUTO_DISCOVER" = "false"; then
   OVS_LDFLAGS="$OVS_LDFLAGS -L$DPDK_LIB_DIR"
 fi
+# Force in pkg-config since this could override user-specified options.
+# It's enough to have -mssse3 to build with DPDK headers.
+DPDK_INCLUDE=$(echo "$DPDK_INCLUDE" | sed 's/-march=[[^ ]]*//g')
 OVS_CFLAGS="$OVS_CFLAGS $DPDK_INCLUDE"
 OVS_ENABLE_OPTION([-mssse3])
 
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v1 branch-2.14 2/2] acinclude: Strip out -mno-avx512f provided by DPDK.

2021-01-15 Thread Ian Stokes
DPDK forces '-mno-avx512f' flag for the application if the toolchain
used to build DPDK had broken AVX512 support.

DPDK forces '-mno-avx512f' flag for the application if the toolchain
used to build DPDK had broken AVX512 support.  But OVS could be built
with a completely different or fixed toolchain with correct avx512
support.

Fix that by stripping out `-mno-avx512f` as we already do for '-march'.
This will allow the OVS to decide if the AVX512 can be used.

Reordering of CFLAGS (i.e. adding DPDK flags before OVS ones) is not an
option since autotools might reorder them back later and it's very
unpredictable.

Reported-at: openvswitch/ovs-issues#201
Signed-off-by: Ilya Maximets 
Co-authored-by: Ilya Maximets 
Signed-off-by: Ian Stokes 
---
 acinclude.m4 | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 14fe4218a..5710f5da8 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -438,7 +438,13 @@ AC_DEFUN([OVS_CHECK_DPDK], [
 fi
 # Force in pkg-config since this could override user-specified options.
 # It's enough to have -mssse3 to build with DPDK headers.
-DPDK_INCLUDE=$(echo "$DPDK_INCLUDE" | sed 's/-march=[[^ ]]*//g')
+DPDK_INCLUDE=$(echo "$DPDK_INCLUDE" | sed 's/-march=[[^ ]]*//g'
+# Also stripping out '-mno-avx512f'.  Support for AVX512 will be disabled
+# if OVS will detect that it's broken.  OVS could be built with a
+# completely different toolchain that correctly supports AVX512, flags
+# forced by DPDK only breaks our feature detection mechanism and leads to
+# build failures: https://github.com/openvswitch/ovs-issues/issues/201
+DPDK_INCLUDE=$(echo "$DPDK_INCLUDE" | sed 's/-mno-avx512f//g'))
 OVS_CFLAGS="$OVS_CFLAGS $DPDK_INCLUDE"
 OVS_ENABLE_OPTION([-mssse3])
 
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v1 branch-2.14 1/2] acinclude: Strip out -march provided by DPDK.

2021-01-15 Thread Ian Stokes
DPDK flags may include -march. Forcing -march could be
considered too heavy a requirement when users compile OVS from
source and could override user provided options.

Resolve this by stripping -march from provided DPDK flags.

Signed-off-by: Ian Stokes 
---
 acinclude.m4 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/acinclude.m4 b/acinclude.m4
index 857067a88..14fe4218a 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -436,6 +436,9 @@ AC_DEFUN([OVS_CHECK_DPDK], [
 if test "$DPDK_AUTO_DISCOVER" = "false"; then
   OVS_LDFLAGS="$OVS_LDFLAGS -L$DPDK_LIB_DIR"
 fi
+# Force in pkg-config since this could override user-specified options.
+# It's enough to have -mssse3 to build with DPDK headers.
+DPDK_INCLUDE=$(echo "$DPDK_INCLUDE" | sed 's/-march=[[^ ]]*//g')
 OVS_CFLAGS="$OVS_CFLAGS $DPDK_INCLUDE"
 OVS_ENABLE_OPTION([-mssse3])
 
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v5 1/1] dpdk: Update to use DPDK v20.11.

2020-12-16 Thread Ian Stokes
This commit adds support for DPDK v20.11, it includes the following
changes.

1. travis: Remove explicit DPDK kmods configuration.
2. sparse: Fix build with 20.05 DPDK tracepoints.
3. netdev-dpdk: Remove experimental API flag.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=173216=*

4. sparse: Update to DPDK 20.05 trace point header.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=179604=*

5. sparse: Fix build with DPDK 20.08.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=200181=*

6. build: Add support for DPDK meson build.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=199138=*

7. netdev-dpdk: Remove usage of RTE_ETH_DEV_CLOSE_REMOVE flag.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=207850=*

8. netdev-dpdk: Fix build with 20.11-rc1.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=209006=*

9. sparse: Fix __ATOMIC_* redefinition errors

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=209452=*

10. build: Remove DPDK make build references.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=216682=*

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

Signed-off-by: David Marchand 
Co-authored-by: David Marchand 
Signed-off-by: Sunil Pai G 
Co-authored-by: Sunil Pai G 
Signed-off-by: Eli Britstein 
Co-authored-by: Eli Britstein 
Tested-by: Harry van Haaren 
Tested-by: Govindharajan, Hariprasad 
Tested-by: Tonghao Zhang 
Signed-off-by: Ian Stokes 

---
v4 -> v5
* Fixed indentation for pkg-config error message.
* Removed typo from pkg-config error message.
* Removed whitespace splitting comment.
---
 .ci/linux-build.sh   |  48 +--
 .ci/linux-prepare.sh |   1 +
 .github/workflows/build-and-test.yml |   5 +-
 .travis.yml  |   3 +
 Documentation/faq/releases.rst   |   2 +-
 Documentation/intro/install/afxdp.rst|   2 +-
 Documentation/intro/install/dpdk.rst |  68 -
 Documentation/topics/dpdk/phy.rst|  22 ---
 Documentation/topics/dpdk/vdev.rst   |   2 +-
 Documentation/topics/dpdk/vhost-user.rst |  20 +-
 Documentation/topics/testing.rst |   2 +-
 Documentation/topics/userspace-tso.rst   |   2 +-
 NEWS |   1 +
 acinclude.m4 | 101 +--
 include/sparse/automake.mk   |   2 +
 include/sparse/rte_mbuf.h|  29 +
 include/sparse/rte_trace_point.h |  28 +
 lib/dpdk.c   |   2 +-
 lib/netdev-dpdk.c|  20 ++
 19 files changed, 216 insertions(+), 144 deletions(-)
 create mode 100644 include/sparse/rte_mbuf.h
 create mode 100644 include/sparse/rte_trace_point.h

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 16102ac94..3e5136fd4 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -87,17 +87,29 @@ function install_dpdk()
 {
 local DPDK_VER=$1
 local VERSION_FILE="dpdk-dir/travis-dpdk-cache-version"
+local DPDK_OPTS=""
+local DPDK_LIB=""
 
 if [ -z "$TRAVIS_ARCH" ] ||
[ "$TRAVIS_ARCH" == "amd64" ]; then
-TARGET="x86_64-native-linuxapp-gcc"
+DPDK_LIB=$(pwd)/dpdk-dir/build/lib/x86_64-linux-gnu
 elif [ "$TRAVIS_ARCH" == "aarch64" ]; then
-TARGET="arm64-armv8a-linuxapp-gcc"
+DPDK_LIB=$(pwd)/dpdk-dir/build/lib/aarch64-linux-gnu
 else
 echo "Target is unknown"
 exit 1
 fi
 
+if [ "$DPDK_SHARED" ]; then
+EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=shared"
+export LD_LIBRARY_PATH=$DPDK_LIB/:$LD_LIBRARY_PATH
+else
+EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=static"
+fi
+
+# Export the following path for pkg-config to find the .pc file.
+export PKG_CONFIG_PATH=$DPDK_LIB/pkgconfig/:$PKG_CONFIG_PATH
+
 if [ "${DPDK_VER##refs/*/}" != "${DPDK_VER}" ]; then
 # Avoid using cache for git tree build.
 rm -rf dpdk-dir
@@ -110,7 +122,8 @@ function install_dpdk()
 if [ -f "${VERSION_FILE}" ]; then
 VER=$(cat ${VERSION_FILE})
 if [ "${VER}" = "${DPDK_VER}" ]; then
-EXTRA_OPTS="${EXTRA_OPTS} --with-dpdk=$(pwd)/dpdk-dir/build"
+# Update the library paths.
+sudo ldconfig
 echo "Found cached DPDK ${VER} build in $(pwd)/dpdk-dir"
 return
 fi
@@ -124,23 +137,24 @@ function install_dpdk()
 pushd dpdk-dir
 fi
 
-make config CC=gcc T=$TARGET
+# Switching to 'default' mac

[ovs-dev] [PATCH v3 1/1] dpdk: Update to use DPDK v20.11.

2020-12-14 Thread Ian Stokes
This commit adds support for DPDK v20.11, it includes the following
changes.

1. travis: Remove explicit DPDK kmods configuration.
2. sparse: Fix build with 20.05 DPDK tracepoints.
3. netdev-dpdk: Remove experimental API flag.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=173216=*

4. sparse: Update to DPDK 20.05 trace point header.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=179604=*

5. sparse: Fix build with DPDK 20.08.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=200181=*

6. build: Add support for DPDK meson build.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=199138=*

7. netdev-dpdk: Remove usage of RTE_ETH_DEV_CLOSE_REMOVE flag.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=207850=*

8. netdev-dpdk: Fix build with 20.11-rc1.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=209006=*

9. sparse: Fix __ATOMIC_* redefinition errors

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=209452=*

10. build: Remove DPDK make build references.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=216682=*

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

Signed-off-by: David Marchand 
Co-authored-by: David Marchand 
Signed-off-by: Sunil Pai G 
Co-authored-by: Sunil Pai G 
Signed-off-by: Eli Britstein 
Co-authored-by: Eli Britstein 
Tested-by: Harry van Haaren 
Tested-by: Govindharajan, Hariprasad 
Signed-off-by: Ian Stokes 

---
v2 -> v3
* Remove GHA others write removal.
* Strip march from pkg-config h=which is forced by DPDK.

RFC v1 -> v2
* Removed RFC tag.
* Rebased to head of master.
* Modified GHA build scripts to install required python packages.
* Modified URLs to use versioned 20.11 links.
* Removed unrequired reformat in travis.yml.
* Modified GHA worflow buil-and-test.yml to remove others write
  permission to $HOME in prepare step.
---
 .ci/linux-build.sh   | 48 ---
 .ci/linux-prepare.sh |  1 +
 .github/workflows/build-and-test.yml |  5 +-
 .travis.yml  |  3 ++
 Documentation/intro/install/afxdp.rst|  2 +-
 Documentation/intro/install/dpdk.rst | 64 ++---
 Documentation/topics/dpdk/phy.rst| 18 ---
 Documentation/topics/dpdk/vhost-user.rst | 20 +---
 Documentation/topics/testing.rst |  2 +-
 NEWS |  1 +
 acinclude.m4 | 82 ++--
 include/sparse/automake.mk   |  2 +
 include/sparse/rte_mbuf.h| 29 +++
 include/sparse/rte_trace_point.h | 28 +++
 lib/dpdk.c   |  2 +-
 lib/netdev-dpdk.c| 20 ++--
 16 files changed, 190 insertions(+), 137 deletions(-)
 create mode 100644 include/sparse/rte_mbuf.h
 create mode 100644 include/sparse/rte_trace_point.h

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 16102ac94..3e5136fd4 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -87,17 +87,29 @@ function install_dpdk()
 {
 local DPDK_VER=$1
 local VERSION_FILE="dpdk-dir/travis-dpdk-cache-version"
+local DPDK_OPTS=""
+local DPDK_LIB=""
 
 if [ -z "$TRAVIS_ARCH" ] ||
[ "$TRAVIS_ARCH" == "amd64" ]; then
-TARGET="x86_64-native-linuxapp-gcc"
+DPDK_LIB=$(pwd)/dpdk-dir/build/lib/x86_64-linux-gnu
 elif [ "$TRAVIS_ARCH" == "aarch64" ]; then
-TARGET="arm64-armv8a-linuxapp-gcc"
+DPDK_LIB=$(pwd)/dpdk-dir/build/lib/aarch64-linux-gnu
 else
 echo "Target is unknown"
 exit 1
 fi
 
+if [ "$DPDK_SHARED" ]; then
+EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=shared"
+export LD_LIBRARY_PATH=$DPDK_LIB/:$LD_LIBRARY_PATH
+else
+EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=static"
+fi
+
+# Export the following path for pkg-config to find the .pc file.
+export PKG_CONFIG_PATH=$DPDK_LIB/pkgconfig/:$PKG_CONFIG_PATH
+
 if [ "${DPDK_VER##refs/*/}" != "${DPDK_VER}" ]; then
 # Avoid using cache for git tree build.
 rm -rf dpdk-dir
@@ -110,7 +122,8 @@ function install_dpdk()
 if [ -f "${VERSION_FILE}" ]; then
 VER=$(cat ${VERSION_FILE})
 if [ "${VER}" = "${DPDK_VER}" ]; then
-EXTRA_OPTS="${EXTRA_OPTS} --with-dpdk=$(pwd)/dpdk-dir/build"
+# Update the library paths.
+sudo ldconfig
 echo "Found cached DPDK ${VER} build in $(pwd)/dpdk-dir"
 return
 fi
@@ -124,23 +137,24 @@ function install_dpdk()
 pushd d

[ovs-dev] [PATCH v2 1/1] dpdk: Update to use DPDK v20.11.

2020-12-02 Thread Ian Stokes
This commit adds support for DPDK v20.11, it includes the following
changes.

1. travis: Remove explicit DPDK kmods configuration.
2. sparse: Fix build with 20.05 DPDK tracepoints.
3. netdev-dpdk: Remove experimental API flag.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=173216=*

4. sparse: Update to DPDK 20.05 trace point header.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=179604=*

5. sparse: Fix build with DPDK 20.08.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=200181=*

6. build: Add support for DPDK meson build.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=199138=*

7. netdev-dpdk: Remove usage of RTE_ETH_DEV_CLOSE_REMOVE flag.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=207850=*

8. netdev-dpdk: Fix build with 20.11-rc1.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=209006=*

9. sparse: Fix __ATOMIC_* redefinition errors

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=209452=*

10. build: Remove DPDK make build references.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=216682=*

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

Signed-off-by: David Marchand 
Co-authored-by: David Marchand 
Signed-off-by: Sunil Pai G 
Co-authored-by: Sunil Pai G 
Signed-off-by: Eli Britstein 
Co-authored-by: Eli Britstein 
Signed-off-by: Ian Stokes 

---
RFC v1 -> v2
* Removed RFC tag.
* Rebased to head of master.
* Modified GHA build scripts to install required python packages.
* Modified URLs to use versioned 20.11 links.
* Removed unrequired reformat in travis.yml.
* Modified GHA worflow buil-and-test.yml to remove others write
  permission to $HOME in prepare step.
---
 .ci/linux-build.sh   | 48 +---
 .ci/linux-prepare.sh |  1 +
 .github/workflows/build-and-test.yml | 10 ++--
 .travis.yml  |  3 ++
 Documentation/intro/install/afxdp.rst|  2 +-
 Documentation/intro/install/dpdk.rst | 64 ++
 Documentation/topics/dpdk/phy.rst| 18 +---
 Documentation/topics/dpdk/vhost-user.rst | 20 +---
 Documentation/topics/testing.rst |  2 +-
 NEWS |  1 +
 acinclude.m4 | 78 +---
 include/sparse/automake.mk   |  2 +
 include/sparse/rte_mbuf.h| 29 
 include/sparse/rte_trace_point.h | 28 
 lib/dpdk.c   |  2 +-
 lib/netdev-dpdk.c| 20 ++--
 16 files changed, 190 insertions(+), 138 deletions(-)
 create mode 100644 include/sparse/rte_mbuf.h
 create mode 100644 include/sparse/rte_trace_point.h

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 16102ac94..3e5136fd4 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -87,17 +87,29 @@ function install_dpdk()
 {
 local DPDK_VER=$1
 local VERSION_FILE="dpdk-dir/travis-dpdk-cache-version"
+local DPDK_OPTS=""
+local DPDK_LIB=""
 
 if [ -z "$TRAVIS_ARCH" ] ||
[ "$TRAVIS_ARCH" == "amd64" ]; then
-TARGET="x86_64-native-linuxapp-gcc"
+DPDK_LIB=$(pwd)/dpdk-dir/build/lib/x86_64-linux-gnu
 elif [ "$TRAVIS_ARCH" == "aarch64" ]; then
-TARGET="arm64-armv8a-linuxapp-gcc"
+DPDK_LIB=$(pwd)/dpdk-dir/build/lib/aarch64-linux-gnu
 else
 echo "Target is unknown"
 exit 1
 fi
 
+if [ "$DPDK_SHARED" ]; then
+EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=shared"
+export LD_LIBRARY_PATH=$DPDK_LIB/:$LD_LIBRARY_PATH
+else
+EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=static"
+fi
+
+# Export the following path for pkg-config to find the .pc file.
+export PKG_CONFIG_PATH=$DPDK_LIB/pkgconfig/:$PKG_CONFIG_PATH
+
 if [ "${DPDK_VER##refs/*/}" != "${DPDK_VER}" ]; then
 # Avoid using cache for git tree build.
 rm -rf dpdk-dir
@@ -110,7 +122,8 @@ function install_dpdk()
 if [ -f "${VERSION_FILE}" ]; then
 VER=$(cat ${VERSION_FILE})
 if [ "${VER}" = "${DPDK_VER}" ]; then
-EXTRA_OPTS="${EXTRA_OPTS} --with-dpdk=$(pwd)/dpdk-dir/build"
+# Update the library paths.
+sudo ldconfig
 echo "Found cached DPDK ${VER} build in $(pwd)/dpdk-dir"
 return
 fi
@@ -124,23 +137,24 @@ function install_dpdk()
 pushd dpdk-dir
 fi
 
-make config CC=gcc T=$TARGET
+# Switching to 'default' machine to make dpdk-dir cache usable on
+# different CPUs. We can't be

[ovs-dev] [RFC PATCH v1 1/1] dpdk: Update to use DPDK v20.11.

2020-11-25 Thread Ian Stokes
This commit adds support for DPDK v20.11, it includes the following
changes.

1. travis: Remove explicit DPDK kmods configuration.
2. sparse: Fix build with 20.05 DPDK tracepoints.
3. netdev-dpdk: Remove experimental API flag.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=173216=*

4. sparse: Update to DPDK 20.05 trace point header.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=179604=*

5. sparse: Fix build with DPDK 20.08.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=200181=*

6. build: Add support for DPDK meson build.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=199138=*

7. netdev-dpdk: Remove usage of RTE_ETH_DEV_CLOSE_REMOVE flag.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=207850=*

8. netdev-dpdk: Fix build with 20.11-rc1.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=209006=*

9. sparse: Fix __ATOMIC_* redefinition errors

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=209452=*

10. build: Remove DPDK make build references.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=216682=*

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

Signed-off-by: David Marchand 
Co-authored-by: David Marchand 
Signed-off-by: Sunil Pai G 
Co-authored-by:Sunil Pai G 
Signed-off-by: Eli Britstein 
Co-authored-by: Eli Britstein 
Signed-off-by: Ian Stokes 
---
 .travis.yml  |  6 ++-
 .travis/linux-build.sh   | 41 +++--
 .travis/linux-prepare.sh |  1 +
 Documentation/intro/install/afxdp.rst|  2 +-
 Documentation/intro/install/dpdk.rst | 64 ++
 Documentation/topics/dpdk/phy.rst| 18 +---
 Documentation/topics/dpdk/vhost-user.rst | 20 +---
 Documentation/topics/testing.rst |  2 +-
 NEWS |  1 +
 acinclude.m4 | 78 +---
 include/sparse/automake.mk   |  2 +
 include/sparse/rte_mbuf.h| 29 
 include/sparse/rte_trace_point.h | 28 
 lib/dpdk.c   |  2 +-
 lib/netdev-dpdk.c| 20 ++--
 15 files changed, 181 insertions(+), 133 deletions(-)
 create mode 100644 include/sparse/rte_mbuf.h
 create mode 100644 include/sparse/rte_trace_point.h

diff --git a/.travis.yml b/.travis.yml
index 9fd8bbe01..78411bd83 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,10 +27,14 @@ addons:
   - selinux-policy-dev
   - libunbound-dev
   - libunwind-dev
+  - python3-setuptools
+  - python3-wheel
+  - ninja-build
 
 before_install: ./.travis/${TRAVIS_OS_NAME}-prepare.sh
 
-before_script: export PATH=$PATH:$HOME/bin
+before_script:
+  - export PATH=$PATH:$HOME/bin
 
 env:
   - OPTS="--disable-ssl"
diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 60d8931f3..750b6dd0c 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -87,17 +87,29 @@ function install_dpdk()
 {
 local DPDK_VER=$1
 local VERSION_FILE="dpdk-dir/travis-dpdk-cache-version"
+local DPDK_OPTS=""
+local DPDK_LIB=""
 
 if [ -z "$TRAVIS_ARCH" ] ||
[ "$TRAVIS_ARCH" == "amd64" ]; then
-TARGET="x86_64-native-linuxapp-gcc"
+DPDK_LIB=$(pwd)/dpdk-dir/build/lib/x86_64-linux-gnu
 elif [ "$TRAVIS_ARCH" == "aarch64" ]; then
-TARGET="arm64-armv8a-linuxapp-gcc"
+DPDK_LIB=$(pwd)/dpdk-dir/build/lib/aarch64-linux-gnu
 else
 echo "Target is unknown"
 exit 1
 fi
 
+if [ "$DPDK_SHARED" ]; then
+EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=shared"
+export LD_LIBRARY_PATH=$DPDK_LIB/:$LD_LIBRARY_PATH
+else
+EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=static"
+fi
+
+# Export the following path for pkg-config to find the .pc file.
+export PKG_CONFIG_PATH=$DPDK_LIB/pkgconfig/:$PKG_CONFIG_PATH
+
 if [ "${DPDK_VER##refs/*/}" != "${DPDK_VER}" ]; then
 # Avoid using cache for git tree build.
 rm -rf dpdk-dir
@@ -110,7 +122,8 @@ function install_dpdk()
 if [ -f "${VERSION_FILE}" ]; then
 VER=$(cat ${VERSION_FILE})
 if [ "${VER}" = "${DPDK_VER}" ]; then
-EXTRA_OPTS="${EXTRA_OPTS} --with-dpdk=$(pwd)/dpdk-dir/build"
+# Update the library paths.
+sudo ldconfig
 echo "Found cached DPDK ${VER} build in $(pwd)/dpdk-dir"
 return
 fi
@@ -124,19 +137,19 @@ function install_dpdk()
 pushd dpdk-dir
 fi
 
-make config CC=gcc T=$TARGET
+   

[ovs-dev] [PATCH v1 1/1] dpif-netdev: Fix typo in copyright header.

2020-10-06 Thread Ian Stokes
Reported-by: David Marchand 
Fixes: 352b6c7116cd ("dpif-lookup: add avx512 gather implementation.")
Fixes: f5ace7cd8a85 ("dpif-netdev: Move dpcls lookup structures to .h")
Cc: Harry Van Haaren 
Signed-off-by: Ian Stokes 
---
 lib/dpif-netdev-lookup-avx512-gather.c | 2 +-
 lib/dpif-netdev-private.h  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/dpif-netdev-lookup-avx512-gather.c 
b/lib/dpif-netdev-lookup-avx512-gather.c
index 12a01a34a..5e3634249 100644
--- a/lib/dpif-netdev-lookup-avx512-gather.c
+++ b/lib/dpif-netdev-lookup-avx512-gather.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020, Intel Corperation.
+ * Copyright (c) 2020, Intel Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/lib/dpif-netdev-private.h b/lib/dpif-netdev-private.h
index bdc150d45..4fda1220b 100644
--- a/lib/dpif-netdev-private.h
+++ b/lib/dpif-netdev-private.h
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2015 Nicira, Inc.
- * Copyright (c) 2019 Intel Corperation.
+ * Copyright (c) 2019 Intel Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2 1/1] DPDK: Remove support for vhost-user zero-copy.

2020-09-10 Thread Ian Stokes
Support for vhost-user dequeue zero-copy was deprecated in OVS 2.14 with
the aim of removing it for OVS 2.15.

OVS only supports zero copy for vhost client mode, as such it will cease
to function due to DPDK commit [1]

Also DPDK is set to remove zero-copy functionality in DPDK 20.11 as
referenced by commit [2]

As such remove support from OVS.

[1] 715070ea10e6 ("vhost: prevent zero-copy with incompatible client mode")
[2] d21003c9dafa ("doc: announce removal of vhost zero-copy dequeue")

Signed-off-by: Ian Stokes 

---
v1 -> v2
* Remove reference to zero copy in vhost post copy documentation.
* Add DPDK commits that have influenced OVS decision to remove support
  for zero-copy.
* Correct NEWS to reference removal rather than deprecation of zc.
---
 Documentation/topics/dpdk/vhost-user.rst | 76 
 NEWS |  2 +
 lib/netdev-dpdk.c| 25 ---
 vswitchd/vswitch.xml | 11 -
 4 files changed, 2 insertions(+), 112 deletions(-)

diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index 4af738d11..3be8f8b5e 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -339,10 +339,6 @@ The default value is ``false``.
 migration recovery was fixed for post-copy in 3.0 and few additional bug
 fixes (like userfaulfd leak) was released in 3.0.1.
 
-DPDK Post-copy feature requires avoiding to populate the guest memory
-(application must not call mlock* syscall). So enabling mlockall and
-dequeue zero-copy features is mis-compatible with post-copy feature.
-
 Note that during migration of vhost-user device, PMD threads hang for the
 time of faulted pages download from source host. Transferring 1GB hugepage
 across a 10Gbps link possibly unacceptably slow. So recommended hugepage
@@ -553,78 +549,6 @@ shown with::
 
   $ ovs-vsctl get Interface dpdkvhostclient0 statistics:ovs_tx_retries
 
-vhost-user Dequeue Zero Copy (experimental)

-
-.. warning::
-
-   vhost-user Dequeue Zero Copy is deprecated in OVS and will be removed in
-   the next release.
-
-Normally when dequeuing a packet from a vHost User device, a memcpy operation
-must be used to copy that packet from guest address space to host address
-space. This memcpy can be removed by enabling dequeue zero-copy like so::
-
-$ ovs-vsctl add-port br0 dpdkvhostuserclient0 -- set Interface \
-dpdkvhostuserclient0 type=dpdkvhostuserclient \
-options:vhost-server-path=/tmp/dpdkvhostclient0 \
-options:dq-zero-copy=true
-
-With this feature enabled, a reference (pointer) to the packet is passed to
-the host, instead of a copy of the packet. Removing this memcpy can give a
-performance improvement for some use cases, for example switching large packets
-between different VMs. However additional packet loss may be observed.
-
-Note that the feature is disabled by default and must be explicitly enabled
-by setting the ``dq-zero-copy`` option to ``true`` while specifying the
-``vhost-server-path`` option as above. If you wish to split out the command
-into multiple commands as below, ensure ``dq-zero-copy`` is set before
-``vhost-server-path``::
-
-$ ovs-vsctl set Interface dpdkvhostuserclient0 options:dq-zero-copy=true
-$ ovs-vsctl set Interface dpdkvhostuserclient0 \
-options:vhost-server-path=/tmp/dpdkvhostclient0
-
-The feature is only available to ``dpdkvhostuserclient`` port types.
-
-A limitation exists whereby if packets from a vHost port with
-``dq-zero-copy=true`` are destined for a ``dpdk`` type port, the number of tx
-descriptors (``n_txq_desc``) for that port must be reduced to a smaller number,
-128 being the recommended value. This can be achieved by issuing the following
-command::
-
-$ ovs-vsctl set Interface dpdkport options:n_txq_desc=128
-
-Note: The sum of the tx descriptors of all ``dpdk`` ports the VM will send to
-should not exceed 128. For example, in case of a bond over two physical ports
-in balance-tcp mode, one must divide 128 by the number of links in the bond.
-
-Refer to :ref:`dpdk-queues-sizes` for more information.
-
-The reason for this limitation is due to how the zero copy functionality is
-implemented. The vHost device's 'tx used vring', a virtio structure used for
-tracking used ie. sent descriptors, will only be updated when the NIC frees
-the corresponding mbuf. If we don't free the mbufs frequently enough, that
-vring will be starved and packets will no longer be processed. One way to
-ensure we don't encounter this scenario, is to configure ``n_txq_desc`` to a
-small enough number such that the 'mbuf free threshold' for the NIC will be hit
-more often and thus free mbufs more frequently. The value of 128 is suggested,
-but values of 64 and 256 have been tested and verified to wo

[ovs-dev] [PATCH v1 1/1] DPDK: Remove support for vhost-user zero-copy.

2020-09-08 Thread Ian Stokes
Support for vhost-user dequeue zero-copy was deprecated in OVS 2.14 with
the aim of removing it for OVS 2.15. Support for zero-copy will also be
removed from DPDK 20.11. As such remove support from OVS.

Signed-off-by: Ian Stokes 
---
 Documentation/topics/dpdk/vhost-user.rst | 72 
 NEWS |  2 +
 lib/netdev-dpdk.c| 25 ---
 vswitchd/vswitch.xml | 11 -
 4 files changed, 2 insertions(+), 108 deletions(-)

diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index 4af738d11..595e40cde 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -553,78 +553,6 @@ shown with::
 
   $ ovs-vsctl get Interface dpdkvhostclient0 statistics:ovs_tx_retries
 
-vhost-user Dequeue Zero Copy (experimental)

-
-.. warning::
-
-   vhost-user Dequeue Zero Copy is deprecated in OVS and will be removed in
-   the next release.
-
-Normally when dequeuing a packet from a vHost User device, a memcpy operation
-must be used to copy that packet from guest address space to host address
-space. This memcpy can be removed by enabling dequeue zero-copy like so::
-
-$ ovs-vsctl add-port br0 dpdkvhostuserclient0 -- set Interface \
-dpdkvhostuserclient0 type=dpdkvhostuserclient \
-options:vhost-server-path=/tmp/dpdkvhostclient0 \
-options:dq-zero-copy=true
-
-With this feature enabled, a reference (pointer) to the packet is passed to
-the host, instead of a copy of the packet. Removing this memcpy can give a
-performance improvement for some use cases, for example switching large packets
-between different VMs. However additional packet loss may be observed.
-
-Note that the feature is disabled by default and must be explicitly enabled
-by setting the ``dq-zero-copy`` option to ``true`` while specifying the
-``vhost-server-path`` option as above. If you wish to split out the command
-into multiple commands as below, ensure ``dq-zero-copy`` is set before
-``vhost-server-path``::
-
-$ ovs-vsctl set Interface dpdkvhostuserclient0 options:dq-zero-copy=true
-$ ovs-vsctl set Interface dpdkvhostuserclient0 \
-options:vhost-server-path=/tmp/dpdkvhostclient0
-
-The feature is only available to ``dpdkvhostuserclient`` port types.
-
-A limitation exists whereby if packets from a vHost port with
-``dq-zero-copy=true`` are destined for a ``dpdk`` type port, the number of tx
-descriptors (``n_txq_desc``) for that port must be reduced to a smaller number,
-128 being the recommended value. This can be achieved by issuing the following
-command::
-
-$ ovs-vsctl set Interface dpdkport options:n_txq_desc=128
-
-Note: The sum of the tx descriptors of all ``dpdk`` ports the VM will send to
-should not exceed 128. For example, in case of a bond over two physical ports
-in balance-tcp mode, one must divide 128 by the number of links in the bond.
-
-Refer to :ref:`dpdk-queues-sizes` for more information.
-
-The reason for this limitation is due to how the zero copy functionality is
-implemented. The vHost device's 'tx used vring', a virtio structure used for
-tracking used ie. sent descriptors, will only be updated when the NIC frees
-the corresponding mbuf. If we don't free the mbufs frequently enough, that
-vring will be starved and packets will no longer be processed. One way to
-ensure we don't encounter this scenario, is to configure ``n_txq_desc`` to a
-small enough number such that the 'mbuf free threshold' for the NIC will be hit
-more often and thus free mbufs more frequently. The value of 128 is suggested,
-but values of 64 and 256 have been tested and verified to work too, with
-differing performance characteristics. A value of 512 can be used too, if the
-virtio queue size in the guest is increased to 1024 (available to configure in
-QEMU versions v2.10 and greater). This value can be set like so::
-
-$ qemu-system-x86_64 ... -chardev socket,id=char1,path=,server
-  -netdev type=vhost-user,id=mynet1,chardev=char1,vhostforce
-  -device virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1,
-  tx_queue_size=1024
-
-Because of this limitation, this feature is considered 'experimental'.
-
-.. note::
-
-   Post-copy Live Migration is not compatible with dequeue zero copy.
-
 Further information can be found in the
 `DPDK documentation
 <https://doc.dpdk.org/guides-19.11/prog_guide/vhost_lib.html>`__
diff --git a/NEWS b/NEWS
index 2f67d5047..2db246d1a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 Post-v2.14.0
 -
+   - DPDK:
+ * Deprecated vhost-user dequeue zero-copy support removed.
 
 
 v2.14.0 - 17 Aug 2020
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 18c4adcc7..515ad612e 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -2032,12 +2032,6 @@ netdev_dpdk_vhost_client_set_config(struct netdev 
*

[ovs-dev] [PATCH v3 1/1] netdev-offload-dpdk: Fix for broken ethernet matching HWOL for XL710NIC.

2020-08-14 Thread Ian Stokes
From: Emma Finn 

This patch introduces a temporary work around to fix
partial hardware offload for XL710 devices. Currently the incorrect
ethernet pattern is being set. This patch will be removed once
this issue is fixed within the i40e PMD.

Signed-off-by: Emma Finn 
Signed-off-by: Eli Britstein 
Co-authored-by: Eli Britstein 
Tested-by: Ian Stokes 
---
 lib/netdev-offload-dpdk.c | 28 
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index de6101e4d..2d668275a 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -696,16 +696,28 @@ parse_flow_match(struct flow_patterns *patterns,
 !eth_addr_is_zero(match->wc.masks.dl_dst)) {
 struct rte_flow_item_eth *spec, *mask;
 
-spec = xzalloc(sizeof *spec);
-mask = xzalloc(sizeof *mask);
+/*
+ * This is a temporary work around to fix ethernet pattern for partial
+ * hardware offload for X710 devices. This fix will be reverted once
+ * the issue is fixed within the i40e PMD driver.
+ */
+if (match->wc.masks.dl_type == OVS_BE16_MAX && is_ip_any(>flow)
+&& eth_addr_is_zero(match->wc.masks.dl_dst)
+&& eth_addr_is_zero(match->wc.masks.dl_src)) {
+spec = NULL;
+mask = NULL;
+} else {
+spec = xzalloc(sizeof *spec);
+mask = xzalloc(sizeof *mask);
 
-memcpy(>dst, >flow.dl_dst, sizeof spec->dst);
-memcpy(>src, >flow.dl_src, sizeof spec->src);
-spec->type = match->flow.dl_type;
+memcpy(>dst, >flow.dl_dst, sizeof spec->dst);
+memcpy(>src, >flow.dl_src, sizeof spec->src);
+spec->type = match->flow.dl_type;
 
-memcpy(>dst, >wc.masks.dl_dst, sizeof mask->dst);
-memcpy(>src, >wc.masks.dl_src, sizeof mask->src);
-mask->type = match->wc.masks.dl_type;
+memcpy(>dst, >wc.masks.dl_dst, sizeof mask->dst);
+memcpy(>src, >wc.masks.dl_src, sizeof mask->src);
+mask->type = match->wc.masks.dl_type;
+}
 
 memset(_masks->dl_dst, 0, sizeof consumed_masks->dl_dst);
 memset(_masks->dl_src, 0, sizeof consumed_masks->dl_src);
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH 1/1] netdev-dpdk: linear buffer check with zero-copy

2020-08-12 Thread Ian Stokes
From: Sivaprasad Tummala 

As of DPDK 19.11, in order to use dequeue-zero-copy in DPDK Vhost library,
the application has to disable the linear buffer option. Hence
dequeue-zero-copy is not supported for vhost application that requires
linear buffers.

An alternative DPDK based approach to disable the linear buffers within
the vhost library itself was proposed in [1], however the consensus was
that application should be responsible for disabling linear buffers.

As such this patch disables linear buffers when zero-copy is enabled.

[1]https://patches.dpdk.org/patch/67200/

Fixes: 127b6a6eea02 ("dpdk: Update to use DPDK 19.11.")
Signed-off-by: Sivaprasad Tummala 
---
 lib/netdev-dpdk.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 44ebf96da..b940b1ac2 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -5059,6 +5059,12 @@ netdev_dpdk_vhost_client_reconfigure(struct netdev 
*netdev)
 /* Enable zero copy flag, if requested */
 if (zc_enabled) {
 vhost_flags |= RTE_VHOST_USER_DEQUEUE_ZERO_COPY;
+/* DPDK vHost library doesn't allow zero-copy with linear buffers.
+ * Hence disable Linear buffer.
+ */
+vhost_flags &= ~RTE_VHOST_USER_LINEARBUF_SUPPORT;
+VLOG_WARN("Zero copy enabled, disabling linear buffer"
+  " check for vHost port %s", dev->up.name);
 }
 
 /* Enable External Buffers if TCP Segmentation Offload is enabled. */
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH 1/1] releases: Add OVS 2.14 to DPDK mapping.

2020-08-11 Thread Ian Stokes
Add an entry for OVS 2.14 to map to the validated DPDK release.

Signed-off-by: Ian Stokes 
---
 Documentation/faq/releases.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index ac93e6e97..9a7a6444c 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -195,6 +195,7 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.11.x   18.11.9
 2.12.x   18.11.9
 2.13.x   19.11.2
+2.14.x   19.11.2
  
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH 1/1] dpdk: Deprecate vhost-user dequeue zero-copy.

2020-08-06 Thread Ian Stokes
Dequeue zero-copy is no longer supported for vhost-user client mode
in DPDK due to commit [1].

In addition to this, zero-copy mode has been proposed to be marked
deprecated in [2] with removal in the next DPDK LTS release.

This commit deprecates support for vhost-user dequeue zero-copy in OVS
with its removal expected in the next OVS release.

[1] 715070ea10e6 ("vhost: prevent zero-copy with incompatible client
mode")
[2] http://mails.dpdk.org/archives/dev/2020-August/177236.html

Signed-off-by: Ian Stokes 
---
 Documentation/topics/dpdk/vhost-user.rst | 5 +
 NEWS | 2 ++
 lib/netdev-dpdk.c| 2 ++
 3 files changed, 9 insertions(+)

diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index b1eb5d9da..4af738d11 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -556,6 +556,11 @@ shown with::
 vhost-user Dequeue Zero Copy (experimental)
 ---
 
+.. warning::
+
+   vhost-user Dequeue Zero Copy is deprecated in OVS and will be removed in
+   the next release.
+
 Normally when dequeuing a packet from a vHost User device, a memcpy operation
 must be used to copy that packet from guest address space to host address
 space. This memcpy can be removed by enabling dequeue zero-copy like so::
diff --git a/NEWS b/NEWS
index dceda95a3..5d6489f26 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,8 @@ v2.14.0 - xx xxx 
CVE-2020-10726, this DPDK version is strongly recommended to be used.
  * New 'ovs-appctl dpdk/log-list' and 'ovs-appctl dpdk/log-set' commands
to list and change log levels in DPDK components.
+ * Vhost-user Dequeue zero-copy support is deprecated and will be removed
+   in the next release.
- Linux datapath:
  * Support for kernel versions up to 5.5.x.
- AF_XDP:
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 44ebf96da..27bf3b6ed 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -5079,6 +5079,8 @@ netdev_dpdk_vhost_client_reconfigure(struct netdev 
*netdev)
   dev->up.name, dev->vhost_id);
 if (zc_enabled) {
 VLOG_INFO("Zero copy enabled for vHost port %s", dev->up.name);
+VLOG_WARN("Zero copy support is deprecated and will be "
+  "removed in the next OVS release.");
 }
 }
 
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2 1/1] dpdk: Use DPDK 19.11.2 release.

2020-07-11 Thread Ian Stokes
Modify travis linux build script to use DPDK 19.11.2 stable release and
update docs to reference 19.11.2 stable release.

Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 2 +-
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 Documentation/topics/userspace-tso.rst   | 9 -
 NEWS | 3 +++
 6 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 02615a8ec..e0a065291 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -170,7 +170,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="19.11"
+DPDK_VER="19.11.2"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index e5cef3915..7c826f239 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -194,7 +194,7 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.10.x   17.11.4
 2.11.x   18.11.6
 2.12.x   18.11.6
-2.13.x   19.11.0
+2.13.x   19.11.2
  ===
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index dbf88ec43..90eaa8aa2 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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 19.11
+- DPDK 19.11.2
 
 - A `DPDK supported NIC`_
 
@@ -71,9 +71,9 @@ Install DPDK
 #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
 
$ cd /usr/src/
-   $ 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
+   $ wget https://fast.dpdk.org/rel/dpdk-19.11.2.tar.xz
+   $ tar xf dpdk-19.11.2.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-stable-19.11.2
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index c6c6fd8bd..4bc5aef59 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -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 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
+$ wget https://fast.dpdk.org/rel/dpdk-19.11.2.tar.xz
+$ tar xf dpdk-19.11.2.tar.xz
+$ export DPDK_DIR=/root/dpdk/dpdk-stable-19.11.2
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/Documentation/topics/userspace-tso.rst 
b/Documentation/topics/userspace-tso.rst
index 0fbac93a5..aafa4a1bf 100644
--- a/Documentation/topics/userspace-tso.rst
+++ b/Documentation/topics/userspace-tso.rst
@@ -104,15 +104,6 @@ on ports without TSO support.  That also means guests 
using vhost-user
 in client mode will receive TSO packet regardless of TSO being enabled
 or disabled within the guest.
 
-When the NIC performing the segmentation is using the i40e DPDK PMD, a fix
-must be included in the DPDK build, otherwise TSO will not work. The fix can
-be found on `DPDK patchwork`__.
-
-__ https://patches.dpdk.org/patch/64136/
-
-This fix is expected to be included in the 19.11.1 release. When OVS migrates
-to this DPDK release, this limitation can be removed.
-
 ~~
 Performance Tuning
 ~~
diff --git a/NEWS b/NEWS
index e52e862e1..e4e926c50 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,9 @@ Post-v2.13.0
  * Add hardware offload support for matching IPv6 protocol (experimental).
  * Add hardware offload support for set of IPv6 src/dst/ttl
and tunnel push-output actions (experimental).
+ * OVS validated with DPDK 19.11.2, due to the inclusion of fixes for
+   CVE-2020-10722, CVE-2020-10723, CVE-2020-10724, CVE-2020-10725 and
+   CVE-2020-10726, this DPDK version is strongly recommended to be used.
- Linux datapath:
  * Support for kernel versions up to 5.5.x.
- AF_XDP:
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-2.10 v1 1/1] dpdk:Use DPDK 17.11.10 release.

2020-07-11 Thread Ian Stokes
Modify travis linux build script to use the latest DPDK stable release.
Update docs for latest DPDK stable releases. Note 17.11.10 is the final
support release for the 17.11 series, no further support releases for
17.11 series are expected.

Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   |  2 +-
 Documentation/faq/releases.rst   | 10 +-
 Documentation/intro/install/dpdk.rst |  8 
 Documentation/topics/dpdk/vhost-user.rst |  6 +++---
 NEWS |  2 +-
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index ede62a54e..c22962073 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -83,7 +83,7 @@ fi
 
 if [ "$DPDK" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="17.11.6"
+DPDK_VER="17.11.10"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index 8fe16d950..32fc3b69b 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -157,9 +157,9 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 A: The following table lists the DPDK version against which the given
 versions of Open vSwitch will successfully build.
 
- ===
+ 
 Open vSwitch DPDK
- ===
+ 
 2.2.x1.6
 2.3.x1.6
 2.4.x2.0
@@ -167,9 +167,9 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.6.x16.07.2
 2.7.x16.11.8
 2.8.x17.05.2
-2.9.x17.11.6
-2.10.x   17.11.6
- ===
+2.9.x17.11.10
+2.10.x   17.11.10
+ 
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
 
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 5f3926316..033e65b45 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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 17.11.6
+- DPDK 17.11.10
 
 - A `DPDK supported NIC`_
 
@@ -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-17.11.6.tar.xz
-   $ tar xf dpdk-17.11.6.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.6
+   $ wget http://fast.dpdk.org/rel/dpdk-17.11.10.tar.xz
+   $ tar xf dpdk-17.11.10.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.10
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index c5fe9ee0f..165012fb7 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -320,9 +320,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-17.11.6.tar.xz
-$ tar xf dpdk-17.11.6.tar.xz
-$ export DPDK_DIR=/root/dpdk/dpdk-stable-17.11.6
+$ wget http://fast.dpdk.org/rel/dpdk-17.11.10.tar.xz
+$ tar xf dpdk-17.11.10.tar.xz
+$ export DPDK_DIR=/root/dpdk/dpdk-stable-17.11.10
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/NEWS b/NEWS
index 6c1c6f7f8..8715349ba 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
 v2.10.5 - xx xxx 
 -
- DPDK
-* OVS validated with DPDK 17.11.6 which is recommended to be used.
+* OVS validated with DPDK 17.11.10 which is recommended to be used.
 
 v2.10.4 - 06 Sep 2019
 -
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-2.13 v2 1/1] dpdk: Use DPDK 19.11.2 release.

2020-07-11 Thread Ian Stokes
Modify travis linux build script to use DPDK 19.11.2 stable release and
update docs to reference 19.11.2 stable release.

Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 2 +-
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 Documentation/topics/userspace-tso.rst   | 9 -
 NEWS | 4 
 6 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index bb47b3ee1..c56885734 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -165,7 +165,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="19.11"
+DPDK_VER="19.11.2"
 fi
 install_dpdk $DPDK_VER
 # Enable pdump support in OVS.
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index 6ff47d788..8c4a973e2 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -187,7 +187,7 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.10.x   17.11.4
 2.11.x   18.11.6
 2.12.x   18.11.6
-2.13.x   19.11.0
+2.13.x   19.11.2
  ===
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index dbf88ec43..90eaa8aa2 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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 19.11
+- DPDK 19.11.2
 
 - A `DPDK supported NIC`_
 
@@ -71,9 +71,9 @@ Install DPDK
 #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
 
$ cd /usr/src/
-   $ 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
+   $ wget https://fast.dpdk.org/rel/dpdk-19.11.2.tar.xz
+   $ tar xf dpdk-19.11.2.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-stable-19.11.2
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index c6c6fd8bd..4bc5aef59 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -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 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
+$ wget https://fast.dpdk.org/rel/dpdk-19.11.2.tar.xz
+$ tar xf dpdk-19.11.2.tar.xz
+$ export DPDK_DIR=/root/dpdk/dpdk-stable-19.11.2
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/Documentation/topics/userspace-tso.rst 
b/Documentation/topics/userspace-tso.rst
index fea69e349..369d70691 100644
--- a/Documentation/topics/userspace-tso.rst
+++ b/Documentation/topics/userspace-tso.rst
@@ -104,15 +104,6 @@ on ports without TSO support.  That also means guests 
using vhost-user
 in client mode will receive TSO packet regardless of TSO being enabled
 or disabled within the guest.
 
-When the NIC performing the segmentation is using the i40e DPDK PMD, a fix
-must be included in the DPDK build, otherwise TSO will not work. The fix can
-be found on `DPDK patchwork`__.
-
-__ https://patches.dpdk.org/patch/64136/
-
-This fix is expected to be included in the 19.11.1 release. When OVS migrates
-to this DPDK release, this limitation can be removed.
-
 ~~
 Performance Tuning
 ~~
diff --git a/NEWS b/NEWS
index a872fffc3..ac7dc670c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,9 @@
 v2.13.1 - xx xxx 
 -
+- DPDK:
+  * OVS validated with DPDK 19.11.2, due to the inclusion of fixes for
+CVE-2020-10722, CVE-2020-10723, CVE-2020-10724, CVE-2020-10725 and
+CVE-2020-10726, this DPDK version is strongly recommended to be used.
 
 v2.13.0 - 14 Feb 2020
 -
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-2.11 v1 1/1] dpdk: Use DPDK 18.11.9 release.

2020-07-11 Thread Ian Stokes
Modify travis linux build script to use the latest DPDK stable release.
Update docs for latest DPDK stable releases.

Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 2 +-
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 NEWS | 7 +--
 5 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index a2bf23af9..ab0089d55 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -88,7 +88,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="18.11.6"
+DPDK_VER="18.11.9"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index 5868da35a..2502efd18 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -176,7 +176,7 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.8.x17.05.2
 2.9.x17.11.4
 2.10.x   17.11.4
-2.11.x   18.11.6
+2.11.x   18.11.9
  ===
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 78a28c16a..510923dcc 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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.6
+- DPDK 18.11.9
 
 - A `DPDK supported NIC`_
 
@@ -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.6.tar.xz
-   $ tar xf dpdk-18.11.6.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.6
+   $ wget http://fast.dpdk.org/rel/dpdk-18.11.9.tar.xz
+   $ tar xf dpdk-18.11.9.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.9
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index 7464e9b43..055cde05a 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -320,9 +320,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.6.tar.xz
-$ tar xf dpdk-18.11.6.tar.xz
-$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.6
+$ wget http://fast.dpdk.org/rel/dpdk-18.11.9.tar.xz
+$ tar xf dpdk-18.11.9.tar.xz
+$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.9
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/NEWS b/NEWS
index be1f38e23..cd0c889c1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,11 @@
 v2.11.4 - xx xxx 
 -
- DPDK
- * OVS validated with DPDK 18.11.6, due to the inclusion of a fix for
-   CVE-2019-14818, this DPDK version is strongly recommended to be used.
+ * OVS validated with DPDK 18.11.9. Due to this being the latest LTS to
+   be validated and coupled with the inclusion of fixes for
+   CVE-2019-14818, CVE-2020-10722, CVE-2020-10723 and CVE-2020-10724
+   over the course of various LTS releases, this DPDK version is strongly
+   recommended to be used.
 
 v2.11.3 - 06 Sep 2019
 -
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-2.12 v1 1/1] dpdk: Use DPDK 18.11.9 release.

2020-07-11 Thread Ian Stokes
Modify travis linux build script to use the latest DPDK stable release.
Update docs for latest DPDK stable releases.

Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 4 ++--
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 NEWS | 7 +--
 5 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index b58c66109..c360ea703 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -105,7 +105,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="18.11.6"
+DPDK_VER="18.11.9"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index 5de0ee6be..d3758d42e 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -178,8 +178,8 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.8.x17.05.2
 2.9.x17.11.4
 2.10.x   17.11.4
-2.11.x   18.11.6
-2.12.x   18.11.6
+2.11.x   18.11.9
+2.12.x   18.11.9
  ===
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 78a28c16a..510923dcc 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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.6
+- DPDK 18.11.9
 
 - A `DPDK supported NIC`_
 
@@ -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.6.tar.xz
-   $ tar xf dpdk-18.11.6.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.6
+   $ wget http://fast.dpdk.org/rel/dpdk-18.11.9.tar.xz
+   $ tar xf dpdk-18.11.9.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.9
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index d9e6745ef..225397853 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -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.6.tar.xz
-$ tar xf dpdk-18.11.6.tar.xz
-$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.6
+$ wget http://fast.dpdk.org/rel/dpdk-18.11.9.tar.xz
+$ tar xf dpdk-18.11.9.tar.xz
+$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.9
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/NEWS b/NEWS
index d99da13a3..d00cc22df 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,11 @@
 v2.12.1 - xx xxx 
 -
- DPDK:
- * OVS validated with DPDK 18.11.6, due to the inclusion of a fix for
-   CVE-2019-14818, this DPDK version is strongly recommended to be used.
+ * OVS validated with DPDK 18.11.9. Due to this being the latest LTS to
+   be validated and coupled with the inclusion of fixes for
+   CVE-2019-14818, CVE-2020-10722, CVE-2020-10723 and CVE-2020-10724
+   over the course of various LTS releases, this DPDK version is strongly
+   recommended to be used.
 
 v2.12.0 - 03 Sep 2019
 -
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-2.9 v1 1/1] dpdk:Use DPDK 17.11.10 release.

2020-07-11 Thread Ian Stokes
Modify travis linux build script to use the latest DPDK stable release.
Update docs for latest DPDK stable releases. Note 17.11.10 is the final
support release for the 17.11 series, no further support releases for
17.11 series are expected.

Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 8 
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 NEWS | 2 +-
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index b13adb46b..2c3b5d1c0 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -83,7 +83,7 @@ fi
 
 if [ "$DPDK" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="17.11.6"
+DPDK_VER="17.11.10"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index 0ea42348e..447045273 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -154,9 +154,9 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 A: The following table lists the DPDK version against which the given
 versions of Open vSwitch will successfully build.
 
- ===
+ 
 Open vSwitch DPDK
- ===
+ 
 2.2.x1.6
 2.3.x1.6
 2.4.x2.0
@@ -164,8 +164,8 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.6.x16.07.2
 2.7.x16.11.8
 2.8.x17.05.2
-2.9.x17.11.6
- ===
+2.9.x17.11.10
+ 
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
 
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index fcbe6b05e..68c8ccc91 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.11.6
+- DPDK 17.11.10
 
 - 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.11.6.tar.xz
-   $ tar xf dpdk-17.11.6.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.6
+   $ wget http://fast.dpdk.org/rel/dpdk-17.11.10.tar.xz
+   $ tar xf dpdk-17.11.10.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.10
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index 197bfac7b..32b42aae0 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -316,9 +316,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-17.11.6.tar.xz
-$ tar xf dpdk-17.11.6.tar.xz
-$ export DPDK_DIR=/root/dpdk/dpdk-stable-17.11.6
+$ wget http://fast.dpdk.org/rel/dpdk-17.11.10.tar.xz
+$ tar xf dpdk-17.11.10.tar.xz
+$ export DPDK_DIR=/root/dpdk/dpdk-stable-17.11.10
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/NEWS b/NEWS
index ae914eabb..a6f1586ac 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
 v2.9.7 - xx xxx 
 
- DPDK
-* OVS validated with DPDK 17.11.6 which is recommended to be used.
+* OVS validated with DPDK 17.11.10 which is recommended to be used.
 
 v2.9.6 - 03 Sep 2019
 
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v1 1/1] dpdk: Use DPDK 19.11.2 release.

2020-07-06 Thread Ian Stokes
Modify travis linux build script to use DPDK 19.11.2 stable release and
update docs to reference 19.11.2 stable release.

Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 2 +-
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 NEWS | 5 -
 5 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 02615a8ec..e0a065291 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -170,7 +170,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="19.11"
+DPDK_VER="19.11.2"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index e5cef3915..7c826f239 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -194,7 +194,7 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.10.x   17.11.4
 2.11.x   18.11.6
 2.12.x   18.11.6
-2.13.x   19.11.0
+2.13.x   19.11.2
  ===
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index dbf88ec43..90eaa8aa2 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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 19.11
+- DPDK 19.11.2
 
 - A `DPDK supported NIC`_
 
@@ -71,9 +71,9 @@ Install DPDK
 #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
 
$ cd /usr/src/
-   $ 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
+   $ wget https://fast.dpdk.org/rel/dpdk-19.11.2.tar.xz
+   $ tar xf dpdk-19.11.2.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-stable-19.11.2
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index c6c6fd8bd..4bc5aef59 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -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 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
+$ wget https://fast.dpdk.org/rel/dpdk-19.11.2.tar.xz
+$ tar xf dpdk-19.11.2.tar.xz
+$ export DPDK_DIR=/root/dpdk/dpdk-stable-19.11.2
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/NEWS b/NEWS
index 0116b3ea0..162fbc991 100644
--- a/NEWS
+++ b/NEWS
@@ -23,7 +23,10 @@ Post-v2.13.0
- Tunnels: TC Flower offload
  * Tunnel Local endpoint address masked match are supported.
  * Tunnel Romte endpoint address masked match are supported.
-
+   - DPDK:
+ * OVS validated with DPDK 19.11.2, due to the inclusion of fixes for
+   CVE-2020-10722, CVE-2020-10723, CVE-2020-10724, CVE-2020-10725 and
+   CVE-2020-10726, this DPDK version is strongly recommended to be used.
 
 v2.13.0 - 14 Feb 2020
 -
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-2.13 v1 1/1] dpdk: Use DPDK 19.11.2 release.

2020-07-06 Thread Ian Stokes
Modify travis linux build script to use DPDK 19.11.2 stable release and
update docs to reference 19.11.2 stable release.

Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 2 +-
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 NEWS | 4 
 5 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index bb47b3ee1..c56885734 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -165,7 +165,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="19.11"
+DPDK_VER="19.11.2"
 fi
 install_dpdk $DPDK_VER
 # Enable pdump support in OVS.
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index 6ff47d788..8c4a973e2 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -187,7 +187,7 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.10.x   17.11.4
 2.11.x   18.11.6
 2.12.x   18.11.6
-2.13.x   19.11.0
+2.13.x   19.11.2
  ===
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index dbf88ec43..90eaa8aa2 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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 19.11
+- DPDK 19.11.2
 
 - A `DPDK supported NIC`_
 
@@ -71,9 +71,9 @@ Install DPDK
 #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
 
$ cd /usr/src/
-   $ 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
+   $ wget https://fast.dpdk.org/rel/dpdk-19.11.2.tar.xz
+   $ tar xf dpdk-19.11.2.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-stable-19.11.2
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index c6c6fd8bd..4bc5aef59 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -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 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
+$ wget https://fast.dpdk.org/rel/dpdk-19.11.2.tar.xz
+$ tar xf dpdk-19.11.2.tar.xz
+$ export DPDK_DIR=/root/dpdk/dpdk-stable-19.11.2
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/NEWS b/NEWS
index a872fffc3..ac7dc670c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,9 @@
 v2.13.1 - xx xxx 
 -
+- DPDK:
+  * OVS validated with DPDK 19.11.2, due to the inclusion of fixes for
+CVE-2020-10722, CVE-2020-10723, CVE-2020-10724, CVE-2020-10725 and
+CVE-2020-10726, this DPDK version is strongly recommended to be used.
 
 v2.13.0 - 14 Feb 2020
 -
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2 1/1] dpdk: Update to use DPDK 19.11.

2019-12-04 Thread Ian Stokes
This commit adds support for DPDK v19.11, it includes the following
changes.

1. travis: Enable compilation and linkage with dpdk 19.11.0

2. sparse: Remove dpdk network headers copies.

3. dpdk: Migratee to new PDUMP API.

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

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

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 
Co-authored-by: David Marchand 
Signed-off-by: Ilya Maximets 
Co-authored-by: Ilya Maximets 
Signed-off-by: Ophir Munk 
Co-authored-by: Ophir Munk 
Signed-off-by: Ian Stokes 

---

v1 -> v2
* Correct email for Ilya on sign off and co author tags.
* Use 19.11 specific address for DPDK guide links.
* Use https instead of http for DPDK links.
* Re-work hotplug igb_uio in docs to explain igb_uio and IOVA detection.
* Remove link to Hotplug framework in docs as it is no longer
  accessible.
---
 .travis/linux-build.sh   |   2 +-
 Documentation/intro/install/dpdk.rst |  10 +-
 Documentation/topics/dpdk/pdump.rst  |  13 +-
 Documentation/topics/dpdk/phy.rst|  24 +-
 Documentation/topics/dpdk/ring.rst   |   2 +-
 Documentation/topics/dpdk/vhost-user.rst |   8 +-
 NEWS |   3 +-
 include/sparse/automake.mk   |   6 -
 include/sparse/rte_esp.h |  65 
 include/sparse/rte_icmp.h| 106 ---
 include/sparse/rte_ip.h  | 490 ---
 include/sparse/rte_sctp.h| 103 ---
 include/sparse/rte_tcp.h | 108 ---
 include/sparse/rte_udp.h | 103 ---
 lib/dpdk.c   |  12 +-
 lib/netdev-dpdk.c|  23 +-
 16 files changed, 54 insertions(+), 1024 deletions(-)
 delete mode 100644 include/sparse/rte_esp.h
 delete mode 100644 include/sparse/rte_icmp.h
 delete mode 100644 include/sparse/rte_ip.h
 delete mode 100644 include/sparse/rte_sctp.h
 delete mode 100644 include/sparse/rte_tcp.h
 delete mode 100644 include/sparse/rte_udp.h

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 8671acbb3..bb47b3ee1 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -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.
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 7a8fd6bf6..dbf88ec43 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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`_
 
@@ -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
@@ -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
diff --git a/Documentation/topics/dpdk/pdump.rst 
b/Documentation/topics/dpdk/pdump.rst
index b4d8aa8e9..ce03b327a 100644
--- a/Documentation/topics/dpdk/pdump.rst
+++ b/Documentation/topics/dpdk/pdump.rst
@@ -47,8 +47,7 @@ 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
@@ -56,11 +55,13 @@ 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.p

[ovs-dev] [PATCH v1 1/1] dpdk: Update to use DPDK 19.11.

2019-12-03 Thread Ian Stokes
This commit adds support for DPDK v19.11, it includes the following
changes.

1. travis: Enable compilation and linkage with dpdk 19.11.0

2. sparse: Remove dpdk network headers copies.

3. dpdk: Migratee to new PDUMP API.

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

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

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 
Co-authored-by: David Marchand 
Signed-off-by: Ilya Maximets 
Co-authored-by: Ilya Maximets 
Signed-off-by: Ophir Munk 
Co-authored-by: Ophir Munk 
Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   |   2 +-
 Documentation/intro/install/dpdk.rst |  10 +-
 Documentation/topics/dpdk/pdump.rst  |  13 +-
 Documentation/topics/dpdk/phy.rst|  18 ++
 Documentation/topics/dpdk/ring.rst   |   2 +-
 Documentation/topics/dpdk/vhost-user.rst |   8 +-
 NEWS |   3 +-
 include/sparse/automake.mk   |   6 -
 include/sparse/rte_esp.h |  65 
 include/sparse/rte_icmp.h| 106 ---
 include/sparse/rte_ip.h  | 490 ---
 include/sparse/rte_sctp.h| 103 ---
 include/sparse/rte_tcp.h | 108 ---
 include/sparse/rte_udp.h | 103 ---
 lib/dpdk.c   |  12 +-
 lib/netdev-dpdk.c|  23 +-
 16 files changed, 50 insertions(+), 1022 deletions(-)
 delete mode 100644 include/sparse/rte_esp.h
 delete mode 100644 include/sparse/rte_icmp.h
 delete mode 100644 include/sparse/rte_ip.h
 delete mode 100644 include/sparse/rte_sctp.h
 delete mode 100644 include/sparse/rte_tcp.h
 delete mode 100644 include/sparse/rte_udp.h

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 8671acbb3..bb47b3ee1 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -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.
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 7a8fd6bf6..5d6c52952 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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`_
 
@@ -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 http://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
@@ -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/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
diff --git a/Documentation/topics/dpdk/pdump.rst 
b/Documentation/topics/dpdk/pdump.rst
index b4d8aa8e9..ce03b327a 100644
--- a/Documentation/topics/dpdk/pdump.rst
+++ b/Documentation/topics/dpdk/pdump.rst
@@ -47,8 +47,7 @@ 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
@@ -56,11 +55,13 @@ 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::
+
+   `

[ovs-dev] [PATCH branch-2.11 1/1] dpdk: Use DPDK 18.11.5 release.

2019-11-26 Thread Ian Stokes
Modify travis linux build script to use the latest DPDK stable release
18.11.5. Update docs for latest DPDK stable releases.

Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 2 +-
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 NEWS | 2 ++
 5 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index de8e76f19..5d91a36ee 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -88,7 +88,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="18.11.2"
+DPDK_VER="18.11.5"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index eeb949d4a..dbeb6c4b2 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -176,7 +176,7 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.8.x17.05.2
 2.9.x17.11.4
 2.10.x   17.11.4
-2.11.x   18.11.2
+2.11.x   18.11.5
  ===
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 6e5f1ea60..13aa8a16f 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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.2
+- DPDK 18.11.5
 
 - A `DPDK supported NIC`_
 
@@ -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.2.tar.xz
-   $ tar xf dpdk-18.11.2.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.2
+   $ 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
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index 33361ec35..ddfb6097d 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -320,9 +320,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.2.tar.xz
-$ tar xf dpdk-18.11.2.tar.xz
-$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.2
+$ 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
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/NEWS b/NEWS
index 7c45f561c..57952ba12 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 v2.11.4 - xx xxx 
 -
+   - DPDK
+ * OVS validated with DPDK 18.11.5 which is recommended to be used.
 
 v2.11.3 - 06 Sep 2019
 -
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-2.12 1/1] dpdk: Use DPDK 18.11.5 release.

2019-11-26 Thread Ian Stokes
Modify travis linux build script to use the latest DPDK stable release
18.11.5. Update docs for latest DPDK stable releases.

Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 4 ++--
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 NEWS | 2 ++
 5 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 17428fa6b..1afa42914 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -105,7 +105,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="18.11.2"
+DPDK_VER="18.11.5"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index e18f5db75..cc06571f5 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -178,8 +178,8 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.8.x17.05.2
 2.9.x17.11.4
 2.10.x   17.11.4
-2.11.x   18.11.2
-2.12.x   18.11.2
+2.11.x   18.11.5
+2.12.x   18.11.5
  ===
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 6e5f1ea60..13aa8a16f 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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.2
+- DPDK 18.11.5
 
 - A `DPDK supported NIC`_
 
@@ -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.2.tar.xz
-   $ tar xf dpdk-18.11.2.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.2
+   $ 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
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index fab87bd3d..a0d35cdd4 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -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.2.tar.xz
-$ tar xf dpdk-18.11.2.tar.xz
-$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.2
+$ 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
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/NEWS b/NEWS
index c81890b7e..967532aee 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 v2.12.1 - xx xxx 
 -
+   - DPDK:
+ * OVS validated with DPDK 18.11.5 which is recommended to be used.
 
 v2.12.0 - 03 Sep 2019
 -
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v1 1/1] dpdk: Use DPDK 18.11.5 release.

2019-11-26 Thread Ian Stokes
Modify travis linux build script to use the latest DPDK stable release
18.11.5. Update docs for latest DPDK stable releases.

Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 2 +-
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 NEWS | 1 +
 5 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 4e74973a3..8671acbb3 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -165,7 +165,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="18.11.2"
+DPDK_VER="18.11.5"
 fi
 install_dpdk $DPDK_VER
 # Enable pdump support in OVS.
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index 4152345e3..2be35d332 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -186,7 +186,7 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.9.x17.11.4
 2.10.x   17.11.4
 2.11.x   18.11.2
-2.12.x   18.11.2
+2.12.x   18.11.5
  ===
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 50de7fbac..7a8fd6bf6 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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.2
+- DPDK 18.11.5
 
 - A `DPDK supported NIC`_
 
@@ -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.2.tar.xz
-   $ tar xf dpdk-18.11.2.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.2
+   $ 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
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index ec0caeb16..2d6462b89 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -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.2.tar.xz
-$ tar xf dpdk-18.11.2.tar.xz
-$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.2
+$ 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
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/NEWS b/NEWS
index 100d7b6a8..850eff7fe 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,7 @@ Post-v2.12.0
  * DPDK pdump packet capture support disabled by default. New configure
option '--enable-dpdk-pdump' to enable it.
  * DPDK pdump support is deprecated and will be removed in next releases.
+ * OVS validated with DPDK 18.11.5 which is recommended to be used.
 
 v2.12.0 - 03 Sep 2019
 -
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v14 0/5] dpcls func ptrs & optimizations

2019-07-19 Thread Ian Stokes

On 7/19/2019 12:14 PM, Stokes, Ian wrote:

-Original Message-
From: Ilya Maximets [mailto:i.maxim...@samsung.com]
Sent: Friday, July 19, 2019 11:57 AM
To: Stokes, Ian ; Van Haaren, Harry
; d...@openvswitch.org
Subject: Re: [ovs-dev] [PATCH v14 0/5] dpcls func ptrs & optimizations

On 19.07.2019 11:27, Ian Stokes wrote:

On 7/19/2019 9:08 AM, Ilya Maximets wrote:

On 19.07.2019 9:58, Ian Stokes wrote:

On 7/18/2019 3:30 PM, Ian Stokes wrote:

On 7/18/2019 2:03 PM, Harry van Haaren wrote:

Hey Folks,

Here a v14 of the DPCLS Function Pointer patchset, as has been
presented at OVS Conf in Nov '18, and discussed on the ML since

then.

I'm aware of the soft-freeze for 2.12, I feel this patchset has

had

enough reviews/versions/testing to be merged in 2.12.

Thanks Ilya for input and suggestions on v13. Only change is that
the implementation of the blocks array memory allocation is now
using DEFINE_PER_THREAD_MALLOCED_DATA() macro, allowing for proper
de-allocation of the allocated memory after a thread exits.

Regards, -Harry


Thanks Harry for the v14. Just testing it and it seems in good

shape

to me.


Thanks Ilya for the suggestions around the per thread allocation

for

scratch as well, this feedback has helped and is resolving multithread
issues spotted in the earlier series.


I feel the patchset is now in a state that it should be considered

for the 2.12 release.


We've had testing from a number of groups over the series (Red Hat,

Arm, Intel, Samsung) with positive results across the board.


It also opens up opportunities for further improving the dpcls in

the

2.13 release next year.


As such I think it's worth an exception to merge before Mondays

feature freeze so that it benefits from the 4 week settling period

before

release.


Are there any objections to this?

Thanks
Ian


Hi All,,

I haven't heard any objections to this since yesterday. My

intentions

are to merge this today.


Hi. Sorry, it was only 2.5 hours of my working time since your

previous

mail.

Are you at office 24/7?


Really? I thought my last email was yesterday evening, maybe there was

a

delay in it going out on my side, it's OVS release crunch time so  tend

to

lose track of time, I'm pretty sure I slept for a few hours since the

last

mail :)



I'm testing the v14 now and will reply with results in a couple of

hours.

Is it OK for you?



Thanks for testing on the latest revsion Ilya, much appreciated. If

you

come across anything untowards today let us know :).

I finished testing v14. No issues observed. Slight performance

difference

with a previous versions, but nothing significant. So, it's OK for me.


Thanks Ilya, can I add your ack for the series with the amendment on

patch 5 you flagged?

OK. Sure.


Cool, thank you very much for the work on this, I'm not being finicky but for 
such a change I think it's worth having two maintainers on board for the 
commits.

Thanks
Ian


Thanks all for the work on this. Pushed to master.

Regards
Ian

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v14 0/5] dpcls func ptrs & optimizations

2019-07-19 Thread Ian Stokes

On 7/19/2019 9:08 AM, Ilya Maximets wrote:

On 19.07.2019 9:58, Ian Stokes wrote:

On 7/18/2019 3:30 PM, Ian Stokes wrote:

On 7/18/2019 2:03 PM, Harry van Haaren wrote:

Hey Folks,

Here a v14 of the DPCLS Function Pointer patchset, as has been
presented at OVS Conf in Nov '18, and discussed on the ML since then.
I'm aware of the soft-freeze for 2.12, I feel this patchset has had
enough reviews/versions/testing to be merged in 2.12.

Thanks Ilya for input and suggestions on v13. Only change is that
the implementation of the blocks array memory allocation is now
using DEFINE_PER_THREAD_MALLOCED_DATA() macro, allowing for proper
de-allocation of the allocated memory after a thread exits.

Regards, -Harry


Thanks Harry for the v14. Just testing it and it seems in good shape to me.

Thanks Ilya for the suggestions around the per thread allocation for scratch as 
well, this feedback has helped and is resolving multithread issues spotted in 
the earlier series.

I feel the patchset is now in a state that it should be considered for the 2.12 
release.

We've had testing from a number of groups over the series (Red Hat, Arm, Intel, 
Samsung) with positive results across the board.

It also opens up opportunities for further improving the dpcls in the 2.13 
release next year.

As such I think it's worth an exception to merge before Mondays feature freeze 
so that it benefits from the 4 week settling period before release.

Are there any objections to this?

Thanks
Ian


Hi All,,

I haven't heard any objections to this since yesterday. My intentions are to 
merge this today.


Hi. Sorry, it was only 2.5 hours of my working time since your previous mail.
Are you at office 24/7?


Really? I thought my last email was yesterday evening, maybe there was a 
delay in it going out on my side, it's OVS release crunch time so  tend 
to lose track of time, I'm pretty sure I slept for a few hours since the 
last mail :)



I'm testing the v14 now and will reply with results in a couple of hours.
Is it OK for you?



Thanks for testing on the latest revsion Ilya, much appreciated. If you 
come across anything untowards today let us know :).


Regards
Ian


Basic CI tests are available as below

https://travis-ci.org/istokes/ovs/builds/560475185
https://ci.appveyor.com/project/istokes/ovs-q1bbe/builds/26074694
https://readthedocs.org/projects/ovs-istokes/builds/9393923/

@Ilya, as you've done a lot of work reviewing/testing/contributing, are you 
happy for me to add your your ACK?


Sure.



Regards
Ian


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v14 0/5] dpcls func ptrs & optimizations

2019-07-19 Thread Ian Stokes

On 7/18/2019 3:30 PM, Ian Stokes wrote:

On 7/18/2019 2:03 PM, Harry van Haaren wrote:

Hey Folks,

Here a v14 of the DPCLS Function Pointer patchset, as has been
presented at OVS Conf in Nov '18, and discussed on the ML since then.
I'm aware of the soft-freeze for 2.12, I feel this patchset has had
enough reviews/versions/testing to be merged in 2.12.

Thanks Ilya for input and suggestions on v13. Only change is that
the implementation of the blocks array memory allocation is now
using DEFINE_PER_THREAD_MALLOCED_DATA() macro, allowing for proper
de-allocation of the allocated memory after a thread exits.

Regards, -Harry


Thanks Harry for the v14. Just testing it and it seems in good shape to me.

Thanks Ilya for the suggestions around the per thread allocation for 
scratch as well, this feedback has helped and is resolving multithread 
issues spotted in the earlier series.


I feel the patchset is now in a state that it should be considered for 
the 2.12 release.


We've had testing from a number of groups over the series (Red Hat, Arm, 
Intel, Samsung) with positive results across the board.


It also opens up opportunities for further improving the dpcls in the 
2.13 release next year.


As such I think it's worth an exception to merge before Mondays feature 
freeze so that it benefits from the 4 week settling period before release.


Are there any objections to this?

Thanks
Ian


Hi All,,

I haven't heard any objections to this since yesterday. My intentions 
are to merge this today.


Basic CI tests are available as below

https://travis-ci.org/istokes/ovs/builds/560475185
https://ci.appveyor.com/project/istokes/ovs-q1bbe/builds/26074694
https://readthedocs.org/projects/ovs-istokes/builds/9393923/

@Ilya, as you've done a lot of work reviewing/testing/contributing, are 
you happy for me to add your your ACK?


Regards
Ian



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v14 0/5] dpcls func ptrs & optimizations

2019-07-18 Thread Ian Stokes

On 7/18/2019 2:03 PM, Harry van Haaren wrote:

Hey Folks,

Here a v14 of the DPCLS Function Pointer patchset, as has been
presented at OVS Conf in Nov '18, and discussed on the ML since then.
I'm aware of the soft-freeze for 2.12, I feel this patchset has had
enough reviews/versions/testing to be merged in 2.12.

Thanks Ilya for input and suggestions on v13. Only change is that
the implementation of the blocks array memory allocation is now
using DEFINE_PER_THREAD_MALLOCED_DATA() macro, allowing for proper
de-allocation of the allocated memory after a thread exits.

Regards, -Harry


Thanks Harry for the v14. Just testing it and it seems in good shape to me.

Thanks Ilya for the suggestions around the per thread allocation for 
scratch as well, this feedback has helped and is resolving multithread 
issues spotted in the earlier series.


I feel the patchset is now in a state that it should be considered for 
the 2.12 release.


We've had testing from a number of groups over the series (Red Hat, Arm, 
Intel, Samsung) with positive results across the board.


It also opens up opportunities for further improving the dpcls in the 
2.13 release next year.


As such I think it's worth an exception to merge before Mondays feature 
freeze so that it benefits from the 4 week settling period before release.


Are there any objections to this?

Thanks
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2] doc: Remove experimental tag for SMC cache.

2019-07-18 Thread Ian Stokes

On 7/18/2019 12:56 PM, Ilya Maximets wrote:

On 17.07.2019 23:25, Ian Stokes wrote:

On 7/17/2019 12:38 PM, Yipeng Wang wrote:

SMC cache was introduced in 2.10 with experimental tag.
SMC cache is a layer of software cache located after EMC
cache. The purpose is to improve the performance of use
cases that many flows missing the EMC cache.

One can enable SMC cache using smc-enable=true option.

Signed-off-by: Yipeng Wang 


Thanks for the v2 Yipeng.

@Ilya, I think this addresses the issues you raised. If this is good with you I 
can add your ack and push tomorrow?


Sure. LGTM.

Best regards, Ilya Maximets.



Thanks all, have pushed this to master.

Regards
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2] doc: Remove experimental tag for SMC cache.

2019-07-17 Thread Ian Stokes

On 7/17/2019 12:38 PM, Yipeng Wang wrote:

SMC cache was introduced in 2.10 with experimental tag.
SMC cache is a layer of software cache located after EMC
cache. The purpose is to improve the performance of use
cases that many flows missing the EMC cache.

One can enable SMC cache using smc-enable=true option.

Signed-off-by: Yipeng Wang 


Thanks for the v2 Yipeng.

@Ilya, I think this addresses the issues you raised. If this is good 
with you I can add your ack and push tomorrow?


Regards
Ian


---
  Documentation/topics/dpdk/bridge.rst | 6 +++---
  NEWS | 1 +
  2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/topics/dpdk/bridge.rst 
b/Documentation/topics/dpdk/bridge.rst
index a3ed926..4ca79a4 100644
--- a/Documentation/topics/dpdk/bridge.rst
+++ b/Documentation/topics/dpdk/bridge.rst
@@ -117,15 +117,15 @@ It is also possible to enable/disable EMC on per-port 
basis using::
  For more information on the EMC refer to :doc:`/intro/install/dpdk` .
  
  
-SMC cache (experimental)

--
+SMC cache
+-
  
  SMC cache or signature match cache is a new cache level after EMC cache.

  The difference between SMC and EMC is SMC only stores a signature of a flow
  thus it is much more memory efficient. With same memory space, EMC can store 
8k
  flows while SMC can store 1M flows. When traffic flow count is much larger 
than
  EMC size, it is generally beneficial to turn off EMC and turn on SMC. It is
-currently turned off by default and an experimental feature.
+currently turned off by default.
  
  To turn on SMC::
  
diff --git a/NEWS b/NEWS

index 806e3c8..feae994 100644
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,7 @@ Post-v2.11.0
   * 'ovs-appctl exit' now implies cleanup of non-internal ports in 
userspace
 datapath regardless of '--cleanup' option. Use '--cleanup' to remove
 internal ports too.
+ * Removed experimental tag for SMC cache.
 - OVSDB:
   * OVSDB clients can now resynchronize with clustered servers much more
 quickly after a brief disconnection, saving bandwidth and CPU time.



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v13 0/5] dpcls func ptrs & optimizations

2019-07-17 Thread Ian Stokes

On 7/17/2019 7:21 PM, Harry van Haaren wrote:

Hey Folks,

Here a v13 of the DPCLS Function Pointer patchset, as has been
presented at OVS Conf in Nov '18, and discussed on the ML since then.
I'm aware of the soft-freeze for 2.12, I feel this patchset has had
enough reviews/versions/testing to be merged in 2.12.

Thanks Ilya and Ian for input and suggestions on v12. Only change is that
the location of the blocks_scratch array has moved from struct dpcls to
a thread local storage internal to the implementation. This avoids leaking
the blocks_scratch concept outside the dpcls implementation, while also
ensuring that each thread running the dpcls has its own scratch memory.

Given the nearing soft-freeze and branch deadlines, I'd like to see
this get merged - and any future minor comments / improvements can be
handled before release.

Regards, -Harry


Thanks for the quick turn around on this Harry, I'm hoping to have a 
closer look on the v13 changes tomorrow.


Regards
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v11 5/5] dpif-netdev: Add specialized generic scalar functions

2019-07-17 Thread Ian Stokes

On 7/17/2019 11:29 AM, Van Haaren, Harry wrote:

-Original Message-
From: Stokes, Ian
Sent: Tuesday, July 16, 2019 10:07 PM
To: Van Haaren, Harry ; d...@openvswitch.org
Cc: echau...@redhat.com; i.maxim...@samsung.com; malvika.gu...@arm.com
Subject: Re: [PATCH v11 5/5] dpif-netdev: Add specialized generic scalar
functions

On 7/15/2019 5:36 PM, Harry van Haaren wrote:

This commit adds a number of specialized functions, that handle





Thanks for the v11 Harry, some minor comments inline below.


Thanks for review!


v11:
- Use MACROs to declare and check optimized functions (Ilya)
- Use captial letter for commit message (Ilya)
- Rebase onto latest patchset changes
- Added NEWS entry for data-path subtable specialization (Ian/Harry)
- Checkpatch notes an "incorrect bracketing" in the MACROs, however I
didn't find a solution that it does like.

v10:
- Rebase changes from previous patches.
- Remove "restrict" keyword as windows CI failed, see here for details:
https://ci.appveyor.com/project/istokes/ovs-q8fvv/builds/24398228

v8:
- Rework to use blocks_cache from the dpcls instance, to avoid variable
lenght arrays in the data-path.
---
   NEWS |  4 +++
   lib/dpif-netdev-lookup-generic.c | 51 
   lib/dpif-netdev-private.h|  8 +
   lib/dpif-netdev.c|  9 --
   4 files changed, 70 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 81130e667..4cfffb1bc 100644
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,10 @@ Post-v2.11.0
* 'ovs-appctl exit' now implies cleanup of non-internal ports in

userspace

  datapath regardless of '--cleanup' option. Use '--cleanup' to

remove

  internal ports too.
+ * Datapath classifer code refactored to enable function pointers to

select

+   the lookup implementation at runtime. This enables specialization of
+   specific subtables based on the miniflow attributes, enhancing the
+   performance of the subtable search.
  - OVSDB:
* OVSDB clients can now resynchronize with clustered servers much

more

  quickly after a brief disconnection, saving bandwidth and CPU time.
diff --git a/lib/dpif-netdev-lookup-generic.c b/lib/dpif-netdev-lookup-

generic.c

index abd166fc3..259c36645 100644
--- a/lib/dpif-netdev-lookup-generic.c
+++ b/lib/dpif-netdev-lookup-generic.c
@@ -233,7 +233,58 @@ dpcls_subtable_lookup_generic(struct dpcls_subtable

*subtable,

 const struct netdev_flow_key *keys[],
 struct dpcls_rule **rules)
   {
+/* Here the runtime subtable->mf_bits counts are used, which forces the
+ * compiler to iterate normal for() loops. Due to this limitation in

the

+ * compilers available optimizations, this function has lower

performance

+ * than the below specialized functions.
+ */
   return lookup_generic_impl(subtable, blocks_scratch, keys_map, keys,

rules,

  subtable->mf_bits_set_unit0,
  subtable->mf_bits_set_unit1);
   }
+
+/* Expand out specialized functions with U0 and U1 bit attributes */


Minor, missing period at end of comment (can fix this on commit if there
are no other revisions).


Fixed.



+DECLARE_OPTIMIZED_LOOKUP_FUNCTION(5,1)
+DECLARE_OPTIMIZED_LOOKUP_FUNCTION(4,1)
+DECLARE_OPTIMIZED_LOOKUP_FUNCTION(4,0)
+
+/* Check if a speicalized function is valid for the required subtable. */

Minor, speicalized -> specialized, again can be fixed on commit otherwise.


Fixed.




+#define CHECK_LOOKUP_FUNCTION(U0,U1)

\

+if (!f && u0_bits == U0 && u1_bits == U1) {

\

+f = dpcls_subtable_lookup_mf_u0w##U0##_u1w##U1;

\

+}
+
+/* Probe function to lookup an available specialized function.
+ * If capable to run the requested miniflow fingerprint, this function

returns

+ * the most optimal implementation for that miniflow fingerprint.
+ * @retval FunctionAddress A valid function to handle the miniflow bit

pattern

+ * @retval 0 The requested miniflow is not supported here, NULL is returned
+ */
+dpcls_subtable_lookup_func
+dpcls_subtable_generic_probe(uint32_t u0_bits, uint32_t u1_bits)
+{
+dpcls_subtable_lookup_func f = NULL;


In the comments you return FunctionAddress but you return f below,
should this not be FunctionAddress or maybe another variable name if
'FunctionAddress' is a bit unwieldy?


Updated return value descriptions as Non-NULL and NULL, and updated comments to
read well. This better describes the code than "FunctionAddress".




-/* Assign the generic lookup - this works with any miniflow

fingerprint. */

-subtable->lookup_func = dpcls_subtable_lookup_generic;
+/* Probe for a specialized generic lookup function. */
+subtable->lookup_func = dpcls_subtable_generic_probe(unit0, unit1);
+
+/* If not set, assign generic lookup. Generic works for any miniflow.

*/

+if 

Re: [ovs-dev] [PATCH v11 5/5] dpif-netdev: Add specialized generic scalar functions

2019-07-16 Thread Ian Stokes

On 7/15/2019 5:36 PM, Harry van Haaren wrote:

This commit adds a number of specialized functions, that handle
common miniflow fingerprints. This enables compiler optimization,
resulting in higher performance. Below a quick description of
how this optimization actually works;

"Specialized functions" are "instances" of the generic implementation,
but the compiler is given extra context when compiling. In the case of
iterating miniflow datastructures, the most interesting value to enable
compile time optimizations is the loop trip count per unit.

In order to create a specialized function, there is a generic implementation,
which uses a for() loop without the compiler knowing the loop trip count at
compile time. The loop trip count is passed in as an argument to the function:

uint32_t miniflow_impl_generic(struct miniflow *mf, uint32_t loop_count)
{
 for(uint32_t i = 0; i < loop_count; i++)
 // do work
}

In order to "specialize" the function, we call the generic implementation
with hard-coded numbers - these are compile time constants!

uint32_t miniflow_impl_loop5(struct miniflow *mf, uint32_t loop_count)
{
 // use hard coded constant for compile-time constant-propogation
 return miniflow_impl_generic(mf, 5);
}

Given the compiler is aware of the loop trip count at compile time,
it can perform an optimization known as "constant propogation". Combined
with inlining of the miniflow_impl_generic() function, the compiler is
now enabled to *compile time* unroll the loop 5x, and produce "flat" code.

The last step to using the specialized functions is to utilize a
function-pointer to choose the specialized (or generic) implementation.
The selection of the function pointer is performed at subtable creation
time, when miniflow fingerprint of the subtable is known. This technique
is known as "multiple dispatch" in some literature, as it uses multiple
items of information (miniflow bit counts) to select the dispatch function.

By pointing the function pointer at the optimized implementation, OvS
benefits from the compile time optimizations at runtime.

Signed-off-by: Harry van Haaren 
Tested-by: Malvika Gupta 



Thanks for the v11 Harry, some minor comments inline below.


---

v11:
- Use MACROs to declare and check optimized functions (Ilya)
- Use captial letter for commit message (Ilya)
- Rebase onto latest patchset changes
- Added NEWS entry for data-path subtable specialization (Ian/Harry)
- Checkpatch notes an "incorrect bracketing" in the MACROs, however I
   didn't find a solution that it does like.

v10:
- Rebase changes from previous patches.
- Remove "restrict" keyword as windows CI failed, see here for details:
   https://ci.appveyor.com/project/istokes/ovs-q8fvv/builds/24398228

v8:
- Rework to use blocks_cache from the dpcls instance, to avoid variable
   lenght arrays in the data-path.
---
  NEWS |  4 +++
  lib/dpif-netdev-lookup-generic.c | 51 
  lib/dpif-netdev-private.h|  8 +
  lib/dpif-netdev.c|  9 --
  4 files changed, 70 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 81130e667..4cfffb1bc 100644
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,10 @@ Post-v2.11.0
   * 'ovs-appctl exit' now implies cleanup of non-internal ports in 
userspace
 datapath regardless of '--cleanup' option. Use '--cleanup' to remove
 internal ports too.
+ * Datapath classifer code refactored to enable function pointers to select
+   the lookup implementation at runtime. This enables specialization of
+   specific subtables based on the miniflow attributes, enhancing the
+   performance of the subtable search.
 - OVSDB:
   * OVSDB clients can now resynchronize with clustered servers much more
 quickly after a brief disconnection, saving bandwidth and CPU time.
diff --git a/lib/dpif-netdev-lookup-generic.c b/lib/dpif-netdev-lookup-generic.c
index abd166fc3..259c36645 100644
--- a/lib/dpif-netdev-lookup-generic.c
+++ b/lib/dpif-netdev-lookup-generic.c
@@ -233,7 +233,58 @@ dpcls_subtable_lookup_generic(struct dpcls_subtable 
*subtable,
const struct netdev_flow_key *keys[],
struct dpcls_rule **rules)
  {
+/* Here the runtime subtable->mf_bits counts are used, which forces the
+ * compiler to iterate normal for() loops. Due to this limitation in the
+ * compilers available optimizations, this function has lower performance
+ * than the below specialized functions.
+ */
  return lookup_generic_impl(subtable, blocks_scratch, keys_map, keys, 
rules,
 subtable->mf_bits_set_unit0,
 subtable->mf_bits_set_unit1);
  }
+
+/* Expand out specialized functions with U0 and U1 bit attributes */


Minor, missing period at end of comment (can fix this on commit if there 
are no other revisions).



+#define 

Re: [ovs-dev] [PATCH v11 0/5] dpcls func ptrs & optimizations

2019-07-16 Thread Ian Stokes

On 7/15/2019 5:36 PM, Harry van Haaren wrote:

Hey Folks,

Here a v11 of the DPCLS Function Pointer patchset, as has been
presented at OVS Conf in Nov '18, and discussed on the ML since then.
I'm aware of the soft-freeze for 2.12, I feel this patchset has had
enough reviews/versions/testing to be merged in 2.12.

Thanks Ilya and Ian for review comments on v10, they should all be addressed
in this v11. Patchset details below, summary of v11 changes as follows:
- Reworked to use hash_add_words64(), unfortunatly hash_words64_inline() did
   not provide the same has due to it calling hash_finish() with a different
   "final" value. Refactored to re-use as much as we can of the existing code.
- Reworked specialized functions to use MACROs as suggested in review. This
   makes the specialization of functions much more tidy - good suggestion!
- Reworked lots of little fixes, Captials and stops.
- Added NEWS entry in "Userspace Datapath" section on DPCLS function pointers
   and how specialization of subtables minfilows gains search performance.
- See per patch --- v11 notes for details :)

Regards, -Harry


Thanks for working on the v11 Harry.

Patches 1-4 in the series looks ok to me. I have some minor comments on 
patch 5.


I've ran it through the usual validation (travis, appveyor, read the 
docs etc). All passing without issue.


I'm just running some performance tests now again with vsperf.

For rfc2544 0% traffic loss for ovs flow scalability 
(phy2phy_scalability) I'm seeing a 10% increase in performance for 64 
byte packets and in the case of scalability where loss is allowed 
(phy2phy_scalability_cont) then I see an 8% increase in performance on 
these baselines.


@Ilya, do you have input on these patches or has Harry addressed your 
concerns in the latest revision?


Regards
Ian

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v10 4/5] dpif-netdev: refactor generic implementation

2019-07-12 Thread Ian Stokes

On 7/9/2019 1:34 PM, Harry van Haaren wrote:

This commit refactors the generic implementation. The
goal of this refactor is to simply the code to enable

'simply' -> 'simplify'?


"specialization" of the functions at compile time.

Given compile-time optimizations, the compiler is able
to unroll loops, and create optimized code sequences due
to compile time knowledge of loop-trip counts.

In order to enable these compiler optimizations, we must
refactor the code to pass the loop-trip counts to functions
as compile time constants.

This patch allows the number of miniflow-bits set per "unit"
in the miniflow to be passed around as a function argument.

Note that this patch does NOT yet take advantage of doing so,
this is only a refactor to enable it in the next patches.

Signed-off-by: Harry van Haaren 
Tested-by: Malvika Gupta 



Thanks for the v10 Harry, some comments below.


---

v10:
- Rebase updates from previous patches
- Fix whitespace indentation of func params
- Removed restrict keyword, Windows CI failing when it is used (Ian)
- Fix integer 0 used to set NULL pointer (Ilya)
- Postpone free() call on cls->blocks_scratch (Ilya)
- Fix indentation of a function

v9:
- Use count_1bits in favour of __builtin_popcount (Ilya)
- Use ALWAYS_INLINE instead of __attribute__ synatx (Ilya)

v8:
- Rework block_cache and mf_masks to avoid variable-lenght array
   due to compiler issues. Provisioning for worst case is not a
   good solution due to magnitue of over-provisioning required.
- Rework netdev_flatten function removing unused parameter
---
  lib/dpif-netdev-lookup-generic.c | 239 ---
  lib/dpif-netdev.c|  77 +-
  lib/dpif-netdev.h|  18 +++
  3 files changed, 281 insertions(+), 53 deletions(-)

diff --git a/lib/dpif-netdev-lookup-generic.c b/lib/dpif-netdev-lookup-generic.c
index d49d4b570..432d8782e 100644
--- a/lib/dpif-netdev-lookup-generic.c
+++ b/lib/dpif-netdev-lookup-generic.c
@@ -29,67 +29,204 @@
  #include "packets.h"
  #include "pvector.h"
  
-/* Returns a hash value for the bits of 'key' where there are 1-bits in

- * 'mask'. */
-static inline uint32_t
-netdev_flow_key_hash_in_mask(const struct netdev_flow_key *key,
- const struct netdev_flow_key *mask)
+VLOG_DEFINE_THIS_MODULE(dpif_lookup_generic);
+
+/* netdev_flow_key_flatten_unit:


No need to mention function name in comments. Applies to other function 
comments in the patch also.


For function comments in OVS you can follow:

http://docs.openvswitch.org/en/latest/internals/contributing/coding-style/#functions


+ * Given a packet, table and mf_masks, this function iterates over each bit
+ * set in the subtable, and calculates the appropriate metadata to store in the
+ * blocks_scratch[].
+ *
+ * The results of the blocks_scratch[] can be used for hashing, and later for
+ * verification of if a rule matches the given packet.
+ */
+static inline void
+netdev_flow_key_flatten_unit(const uint64_t *pkt_blocks,
+ const uint64_t *tbl_blocks,
+ const uint64_t *mf_masks,
+ uint64_t *blocks_scratch,
+ const uint64_t pkt_mf_bits,
+ const uint32_t count)
  {
-const uint64_t *p = miniflow_get_values(>mf);
-uint32_t hash = 0;
-uint64_t value;
+uint32_t i;

New line just to separate variable declaration form function body.


+for (i = 0; i < count; i++) {
+uint64_t mf_mask = mf_masks[i];
+/* Calculate the block index for the packet metadata */
+uint64_t idx_bits = mf_mask & pkt_mf_bits;
+const uint32_t pkt_idx = count_1bits(idx_bits);
  
-NETDEV_FLOW_KEY_FOR_EACH_IN_FLOWMAP (value, key, mask->mf.map) {

-hash = hash_add64(hash, value & *p);
-p++;
+/* check if the packet has the subtable miniflow bit set. If yes, the


For above and for other comments in the patch, capitalization at 
beginning, period to finish.



+ * block at the above pkt_idx will be stored, otherwise it is masked
+ * out to be zero.
+ */
+uint64_t pkt_has_mf_bit = (mf_mask + 1) & pkt_mf_bits;
+uint64_t no_bit = ((!pkt_has_mf_bit) > 0) - 1;
+
+/* mask packet block by table block, and mask to zero if packet
+ * doesn't actually contain this block of metadata
+ */
+blocks_scratch[i] = pkt_blocks[pkt_idx] & tbl_blocks[i] & no_bit;
  }
+}
+
+/* netdev_flow_key_flatten:
+ * This function takes a packet, and subtable and writes an array of uint64_t
+ * blocks. The blocks contain the metadata that the subtable matches on, in
+ * the same order as the subtable, allowing linear iteration over the blocks.
+ *
+ * To calculate the blocks contents, the netdev_flow_key_flatten_unit function
+ * is called twice, once for each "unit" of the miniflow. This call can be
+ * inlined by the compiler for performance.

[ovs-dev] OVS-DPDK public meeting

2019-07-10 Thread Ian Stokes

Next meeting July 24th 1700 UTC

July 10th minutes

Attendees: Ian, Aaron, Eelco, Fouad, Johann, Scott, Simon.

===
GENERAL
===

- OVS 2.12 (Ian)
-- Dates
--- Soft Freeze entered 7th July. Will remain until the 22nd of July.
 Hard freeze from the 22nd of July onwards. Only bug fixes accepted 
for 2.12 beyond this point.

 Release ~ mid August (typically 4 weeks after hard freeze).


PERFORMANCE/FEATURES


- Quicker PMD Reloads
 -- Status: v4 accepted and upstreamed to master.

- Poll enabled vHost queues.
 -- Status: Accepted and upstreamed to master.

- Vhost retry stats and configuration.
 -- Status: Accepted and upstreamed to master.

- DPDK 18.11.2 support.
 -- Status: accepted to master and branch 2.11.
 -- 18.11.2 is now the minimum DPDK supported for master.
 -- OVS 2.11 will still be able to use 18.11.2 or earlier.

- dpcls function pointer & optimizations.
 -- Status: v10 revision sent to mailing list yesterday.
 -- Corrects latest issues flagged on v9, now passes travis, appveyor etc.
 -- Testing on ARM & x86 showing performance improvements 10 - 15%.

- RFC 4115 egress policer on dpdk-next, sent RFC patch (Eelco).
-- Required policer functionality available since DPDK 19.05.
-- Looking for feedback on current RFC series so as to merge the 
feature to master as soon as DPDK 19.11 is supported in OVS.

-- https://patchwork.ozlabs.org/patch/1122062/

- HW CT offload (Aaron)
-- RFC v2 submitted.
-- https://patchwork.ozlabs.org/project/openvswitch/list/?series=117809
-- Question regarding would this be too late for consideration of OVS 2.12?
-- Probably best for author to raise with maintainers on mailing list 
for exception if enough feedback is secured before the 2.12 deadline.



Bugs

- Call to action for the 2.12 release window.
- Testing and validation across the community before the 2.12 release 
date appreciated. Any bugs or regression reported to the mailing list.


Regards
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v10 3/5] dpif-netdev: split out generic lookup function

2019-07-10 Thread Ian Stokes

On 7/9/2019 1:34 PM, Harry van Haaren wrote:

This commit splits the generic hash-lookup-verify
function to its own file. In doing so, we must move
some MACRO definitions to dpif-netdev.h

Signed-off-by: Harry van Haaren 
Tested-by: Malvika Gupta 



Thanks Harry, some feedback below.


---

v10:
- Rebase fixups from previous patch changes
- Add copyright as suggested in review (Ian)

v6:
- Fixup some checkpatch warnings on whitespace with MACROs (Ilya)
- Other MACROs function incorrectly when checkpatch is happy,
   so using the functional version without space after the ( character.
   This prints a checkpatch warning, but I see no way to fix it.
---
  lib/automake.mk  |  1 +
  lib/dpif-netdev-lookup-generic.c | 95 
  lib/dpif-netdev.c| 82 +--
  lib/dpif-netdev.h| 16 ++
  4 files changed, 113 insertions(+), 81 deletions(-)
  create mode 100644 lib/dpif-netdev-lookup-generic.c






+
+uint32_t
+dpcls_subtable_lookup_generic(struct dpcls_subtable *subtable,
+  uint32_t keys_map,
+  const struct netdev_flow_key *keys[],
+  struct dpcls_rule **rules)
+{
+int i;
+/* Compute hashes for the remaining keys.  Each search-key is
+ * masked with the subtable's mask to avoid hashing the wildcarded
+ * bits. */
+uint32_t hashes[NETDEV_MAX_BURST];
+ULLONG_FOR_EACH_1(i, keys_map) {
+hashes[i] = netdev_flow_key_hash_in_mask(keys[i],
+ >mask);
+}
+
+/* Lookup. */
+const struct cmap_node *nodes[NETDEV_MAX_BURST];
+uint32_t found_map =
+cmap_find_batch(>rules, keys_map, hashes, nodes);


I would prefer to see

uint32_t found_map = cmap_find_batch(>rules,
 keys_map, hashes, nodes);

or alternatively you could declare uint32_t found_map at the beginning 
of the function so that way cmap_find_batch and arguments should be able 
to stay on the same line.



+/* Check results.  When the i-th bit of found_map is set, it means
+ * that a set of nodes with a matching hash value was found for the
+ * i-th search-key.  Due to possible hash collisions we need to check
+ * which of the found rules, if any, really matches our masked
+ * search-key. */
+ULLONG_FOR_EACH_1(i, found_map) {
+struct dpcls_rule *rule;
+
+CMAP_NODE_FOR_EACH (rule, cmap_node, nodes[i]) {
+if (OVS_LIKELY(dpcls_rule_matches_key(rule, keys[i]))) {
+rules[i] = rule;
+/* Even at 20 Mpps the 32-bit hit_cnt cannot wrap
+ * within one second optimization interval. */
+subtable->hit_cnt++;
+goto next;
+}
+}
+/* None of the found rules was a match.  Reset the i-th bit to
+ * keep searching this key in the next subtable. */
+ULLONG_SET0(found_map, i);  /* Did not match. */
+next:
+; /* Keep Sparse happy. */
+}
+
+return found_map;
+}
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 2414103d8..190cc8918 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -235,14 +235,6 @@ struct dpcls {
  struct pvector subtables;
  };
  





  /* Data structure to keep packet order till fastpath processing. */
  struct dp_packet_flow_map {
  struct dp_packet *packet;
@@ -260,8 +252,6 @@ static bool dpcls_lookup(struct dpcls *cls,
   const struct netdev_flow_key *keys[],
   struct dpcls_rule **rules, size_t cnt,
   int *num_lookups_p);
-static bool dpcls_rule_matches_key(const struct dpcls_rule *rule,
-const struct netdev_flow_key *target);


I know you are only removing the function prototype above, but a new 
line here added would look better as well just to split the prototypes 
from the comments for the define section below for the meter flags.



  /* Set of supported meter flags */
  #define DP_SUPPORTED_METER_FLAGS_MASK \
  (OFPMF13_STATS | OFPMF13_PKTPS | OFPMF13_KBPS | OFPMF13_BURST)
@@ -2741,27 +2731,6 @@ netdev_flow_key_init_masked(struct netdev_flow_key *dst,
  (dst_u64 - miniflow_get_values(>mf)) * 8);
  }
  





  /* For each miniflow in 'keys' performs a classifier lookup writing the result
   * into the corresponding slot in 'rules'.  If a particular entry in 'keys' is
   * NULL it is skipped.
diff --git a/lib/dpif-netdev.h b/lib/dpif-netdev.h
index 3d23743bd..3c3cc65ef 100644
--- a/lib/dpif-netdev.h
+++ b/lib/dpif-netdev.h
@@ -52,6 +52,14 @@ struct netdev_flow_key {
  uint64_t buf[FLOW_MAX_PACKET_U64S];
  };
  
+/* A rule to be 

Re: [ovs-dev] [PATCH v10 1/5] dpif-netdev: implement function pointers/subtable

2019-07-10 Thread Ian Stokes

On 7/10/2019 4:40 PM, Van Haaren, Harry wrote:

-Original Message-
From: Stokes, Ian
Sent: Wednesday, July 10, 2019 4:30 PM
To: Van Haaren, Harry ; d...@openvswitch.org
Cc: i.maxim...@samsung.com; malvika.gu...@arm.com
Subject: Re: [PATCH v10 1/5] dpif-netdev: implement function pointers/subtable

On 7/9/2019 1:34 PM, Harry van Haaren wrote:

This allows plugging-in of different subtable hash-lookup-verify
routines, and allows special casing of those functions based on
known context (eg: # of bits set) of the specific subtable.

Signed-off-by: Harry van Haaren 
Tested-by: Malvika Gupta 



Thanks for this harry, few minor comments below.


Hey, cool I'll snip away irrelevant code sections for readability.









I've thought about whether an item should be added to the NEWS doc
(possibly not in this patch but perhaps later in the series), it's hard
to say as the changes are under the hood and not configurable by a user.
Thoughts?


Correct the user shouldn't identify the actual changes, except for small
gains in performance if the specialized subtables are in use.

I think it would be good to add a NEWS item, as people profiling OVS's functions
will see different function names, and having called out the DPCLS Function 
Pointer
changes, and why they are there would be beneficial.

I will draft a separate patch for NEWS item - so we can keep it parallel to 
this patch set.
Shout if that is not a good approach :)


I would think it could be added as part of patch 5 of the series as 
that's when the performance increase is introduced? Anyway it's minor 
enough that if there is not another revision of the series it can be 
done upon commit.


Regards
Ian

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v10 2/5] dpif-netdev: move dpcls lookup structures to .h

2019-07-10 Thread Ian Stokes

On 7/9/2019 1:34 PM, Harry van Haaren wrote:

This commit moves some data-structures to be available
in the dpif-netdev.h header. This allows specific implementations
of the subtable lookup function to include just that header
file, and not require that the code exists in dpif-netdev.c

Signed-off-by: Harry van Haaren 
Tested-by: Malvika Gupta 

---

v10:
- Rebase updates from previous patch in code that moved.
- Move cmap.h include into alphabetical order (Ian)
- Fix comment and typo (Ian)
- Restructure function typedef to fit in 80 chars


Thanks for addressing the issues raised in v9,

Although previously I said this could be combined with patch 1 and 3,now 
I'm thinking it might be better to leave them split as is. Logically 
they accomplish separate goals in each patch.


Seeing the division of the patches in this series was definitely helpful 
to myself during reviews so I'm thinking it may be helpful to others in 
the future if they are moving from the current dpcls approach to this 
generic approach. Unless there are objections I suggest we leave as is.


Ian


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v10 1/5] dpif-netdev: implement function pointers/subtable

2019-07-10 Thread Ian Stokes

On 7/9/2019 1:34 PM, Harry van Haaren wrote:

This allows plugging-in of different subtable hash-lookup-verify
routines, and allows special casing of those functions based on
known context (eg: # of bits set) of the specific subtable.

Signed-off-by: Harry van Haaren 
Tested-by: Malvika Gupta 



Thanks for this harry, few minor comments below.


---

v10:
- Fix capitalization of comments, and punctuation. (Ian)
- Variable declarations up top before use (Ian)
- Fix alignment of function parameters, had to newline after typedef (Ian)
- Some mailing-list questions relpied to on-list (Ian)

v9:
- Use count_1bits in favour of __builtin_popcount (Ilya)

v6:
- Implement subtable effort per packet "lookups_match" counter  (Ilya)
- Remove double newline (Eelco)
- Remove double * before comments (Eelco)
- Reword comments in dpcls_lookup() for clarity (Harry)
---
  lib/dpif-netdev.c | 138 --
  1 file changed, 96 insertions(+), 42 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index f4b59e41b..f02bcd552 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -7603,6 +7603,28 @@ dpif_dummy_register(enum dummy_level level)
  
  /* Datapath Classifier. */
  
+/* Forward declaration for lookup_func typedef. */

+struct dpcls_subtable;
+
+/* Lookup function for a subtable in the dpcls. This function is called
+ * by each subtable with an array of packets, and a bitmask of packets to
+ * perform the lookup on. Using a function pointer gives flexibility to
+ * optimize the lookup function based on subtable properties and the
+ * CPU instruction set available at runtime.
+ */
+typedef
+uint32_t (*dpcls_subtable_lookup_func)(struct dpcls_subtable *subtable,
+   uint32_t keys_map,
+   const struct netdev_flow_key *keys[],
+   struct dpcls_rule **rules);
+
+/* Prototype for generic lookup func, using same code path as before. */
+uint32_t
+dpcls_subtable_lookup_generic(struct dpcls_subtable *subtable,
+  uint32_t keys_map,
+  const struct netdev_flow_key *keys[],
+  struct dpcls_rule **rules);
+
  /* A set of rules that all have the same fields wildcarded. */
  struct dpcls_subtable {
  /* The fields are only used by writers. */
@@ -7612,6 +7634,13 @@ struct dpcls_subtable {
  struct cmap rules;   /* Contains "struct dpcls_rule"s. */
  uint32_t hit_cnt;/* Number of match hits in subtable in 
current
  optimization interval. */
+
+/* The lookup function to use for this subtable. If there is a known
+ * property of the subtable (eg: only 3 bits of miniflow metadata is
+ * used for the lookup) then this can point at an optimized version of
+ * the lookup function for this particular subtable. */
+dpcls_subtable_lookup_func lookup_func;
+
  struct netdev_flow_key mask; /* Wildcards for fields (const). */
  /* 'mask' must be the last field, additional space is allocated here. */
  };
@@ -7671,6 +7700,10 @@ dpcls_create_subtable(struct dpcls *cls, const struct 
netdev_flow_key *mask)
  cmap_init(>rules);
  subtable->hit_cnt = 0;
  netdev_flow_key_clone(>mask, mask);
+
+/* Decide which hash/lookup/verify function to use. */
+subtable->lookup_func = dpcls_subtable_lookup_generic;
+
  cmap_insert(>subtables_map, >cmap_node, mask->hash);
  /* Add the new subtable at the end of the pvector (with no hits yet) */
  pvector_insert(>subtables, subtable, 0);
@@ -7831,6 +7864,55 @@ dpcls_rule_matches_key(const struct dpcls_rule *rule,
  return true;
  }
  
+uint32_t

+dpcls_subtable_lookup_generic(struct dpcls_subtable *subtable,
+  uint32_t keys_map,
+  const struct netdev_flow_key *keys[],
+  struct dpcls_rule **rules)
+{
+int i;
+uint32_t found_map;


I was thinking should this be initialized to 0, but  I don't think there 
is a need. the call to cmap_find_batch() below will set it to 0 in the 
case of no math, otherwise set the i-th bit for a match so I thinks it's ok.



+
+/* Compute hashes for the remaining keys.  Each search-key is
+ * masked with the subtable's mask to avoid hashing the wildcarded
+ * bits. */
+uint32_t hashes[NETDEV_MAX_BURST];
+ULLONG_FOR_EACH_1(i, keys_map) {
+hashes[i] = netdev_flow_key_hash_in_mask(keys[i],
+ >mask);
+}
+
+/* Lookup. */
+const struct cmap_node *nodes[NETDEV_MAX_BURST];
+found_map = cmap_find_batch(>rules, keys_map, hashes, nodes);
+
+/* Check results.  When the i-th bit of found_map is set, it means
+ * that a set of nodes with a matching hash value was found for the

Re: [ovs-dev] [PATCH v4 0/5] Quicker pmd threads reloads

2019-07-10 Thread Ian Stokes

On 7/10/2019 10:03 AM, Ilya Maximets wrote:

On 09.07.2019 19:19, David Marchand wrote:

We have been testing the rebalance code in different situations while
having traffic going through OVS.
Those tests have shown that part of the observed packets losses is due to
some time wasted in signaling/waiting for the pmd threads to reload their
polling configurations.

This series is an attempt at getting pmd threads reloads quicker and
more deterministic.

Example of number of cycles spent by a pmd between two polling
configurations (in cycles minimum/average/maximum of 1000 changes):
- cfc06fb13d9c: 141059/332512/6230137
- patch1:   146114/279722/ 721557
- patch2:46118/176561/ 459963
- patch3:13878/124914/ 509629
- patch4:12980/157706/ 509447
- patch5:12945/ 17715/  45592

Changelog since v3:
- explicitly do not wait for non pmd reload in patch 2
- added Eelco acks

Changelog since v2:
- remove unneeded synchronisation on pmd thread join in patch 2

Changelog since v1:
- incorporated Ilya suggestions in patch 2 and 3
- dropped previous acks on patch 2 and 3 but kept them on patch 4 and 5 since
   there is no major change in them

Changelog since RFC v2:
- added ack from Eelco

Changelog since RFC v1:
- added numbers per patch in cover letter
- added memory ordering for explicit synchronisations between threads
   in patch 1 and patch 2



For the series:
Acked-by: Ilya Maximets 



Thanks all for the work on this series. I've validated the v4 and added 
the documentation clarification patch Ilya had provided. Pushed to master.


Regards
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] dpif-netdev: Clarify PMD reloading scheme.

2019-07-10 Thread Ian Stokes

On 7/10/2019 12:50 PM, Ilya Maximets wrote:

It became more complicated, hence needs to be documented.

Signed-off-by: Ilya Maximets 


Thanks for taking care of this Ilya, very valuable info.

Looks fine to me.

I was just getting ready to push the quicker PMD reload series, I'll add 
this as part of the push to master.


Regards
Ian

---

Applicable on top of "Quicker pmd threads reloads" patch-set:
https://patchwork.ozlabs.org/project/openvswitch/list/?series=118588=*

  lib/dpif-netdev.c | 39 +++
  1 file changed, 39 insertions(+)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 647a8ee4b..c5ffc72f5 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -682,10 +682,49 @@ struct dp_netdev_pmd_thread {
  
  struct seq *reload_seq;

  uint64_t last_reload_seq;
+
+/* These are atomic variables used as a synchronization and configuration
+ * points for thread reload/exit.
+ *
+ * 'reload' atomic is the main one and it's used as a memory
+ * synchronization point for all other knobs and data.
+ *
+ * For a thread that requests PMD reload:
+ *
+ *   * All changes that should be visible to the PMD thread must be made
+ * before setting the 'reload'.  These changes could use any memory
+ * ordering model including 'relaxed'.
+ *   * Setting the 'reload' atomic should occur in the same thread where
+ * all other PMD configuration options updated.
+ *   * Setting the 'reload' atomic should be done with 'release' memory
+ * ordering model or stricter.  This will guarantee that all previous
+ * changes (including non-atomic and 'relaxed') will be visible to
+ * the PMD thread.
+ *   * To check that reload is done, thread should poll the 'reload' atomic
+ * to become 'false'.  Polling should be done with 'acquire' memory
+ * ordering model or stricter.  This ensures that PMD thread completed
+ * the reload process.
+ *
+ * For the PMD thread:
+ *
+ *   * PMD thread should read 'reload' atomic with 'acquire' memory
+ * ordering model or stricter.  This will guarantee that all changes
+ * made before setting the 'reload' in the requesting thread will be
+ * visible to the PMD thread.
+ *   * All other configuration data could be read with any memory
+ * ordering model (including non-atomic and 'relaxed') but *only after*
+ * reading the 'reload' atomic set to 'true'.
+ *   * When the PMD reload done, PMD should (optionally) set all the below
+ * knobs except the 'reload' to their default ('false') values and
+ * (mandatory), as the last step, set the 'reload' to 'false' using
+ * 'release' memory ordering model or stricter.  This will inform the
+ * requesting thread that PMD has completed a reload cycle.
+ */
  atomic_bool reload; /* Do we need to reload ports? */
  atomic_bool wait_for_reload;/* Can we busy wait for the next reload? 
*/
  atomic_bool reload_tx_qid;  /* Do we need to reload static_tx_qid? */
  atomic_bool exit;   /* For terminating the pmd thread. */
+
  pthread_t thread;
  unsigned core_id;   /* CPU core id of this pmd thread. */
  int numa_id;/* numa node id of this pmd thread. */



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v4 0/3] vhost tx retry updates

2019-07-08 Thread Ian Stokes

On 7/2/2019 1:32 AM, Kevin Traynor wrote:

v4:
- 1/2 New patch: Move vhost tx retries doc to a seperate section (David)

- 2/3
-- Changed tx_retries to be a custom stat for vhost (Ilya)
-- Added back in MIN() that was dropped in v2, as in retesting I
saw it is needed when the retry limit is reached to prevent
an accounting error
-- note: this is not a typo, it was just out of date
-/* 44 pad bytes here. */
+/* 4 pad bytes here. */
-- Removed acks due to the amount of changes made



Thanks all for the work reviewing this. I've made the final amendments 
suggested and pushed to master.


Thanks
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v4 2/3] netdev-dpdk: Add custom stat for vhost tx retries.

2019-07-04 Thread Ian Stokes

On 7/4/2019 4:15 PM, Ilya Maximets wrote:

On 04.07.2019 18:13, Ian Stokes wrote:

On 7/4/2019 12:18 PM, Ilya Maximets wrote:

On 04.07.2019 14:06, David Marchand wrote:



On Thu, Jul 4, 2019 at 12:42 PM Ilya Maximets mailto:i.maxim...@samsung.com>> wrote:

  On 03.07.2019 18:03, Ian Stokes wrote:
  > On 7/2/2019 1:32 AM, Kevin Traynor wrote:
  >> vhost tx retries may occur, and it can be a sign that
  >> the guest is not optimally configured.
  >>
  >> Add a custom stat so a user will know if vhost tx retries are
  >> occurring and hence give a hint that guest config should be
  >> examined.
  >>
  >
  > Thanks Kevin, tests ok for me.
  >
  > Just a general comment on the design. In comparison to the previous 
approach proposed there seems to be more required with the custom stat approach 
below.
  >
  > This may be ok as the retry is very OVS DPDK specific and doesn;t come 
dor lets say DPDK (unlike the XTATS).
  >
  > @Ilya, whats your thoughts? Is this approach preferable for you rather 
than adding it to the general stats for all devices? (in which case I agree, they 
will not be used for dpdk types so will not be of use).

  I think, It's better to keep this in custom stats section since
  no other port types are going to use it in a near future.

  Have a few style/naming comments inline.

  >
  > One other minor comment below.
  >
  >> Signed-off-by: Kevin Traynor mailto:ktray...@redhat.com>>
  >> ---
  >>   Documentation/topics/dpdk/vhost-user.rst |  5 
  >>   lib/netdev-dpdk.c    | 38 
+++-
  >>   2 files changed, 42 insertions(+), 1 deletion(-)
  >>
  >> diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
  >> index 5f393aced..368f44520 100644
  >> --- a/Documentation/topics/dpdk/vhost-user.rst
  >> +++ b/Documentation/topics/dpdk/vhost-user.rst
  >> @@ -521,4 +521,9 @@ The guest should also have sufficient cores 
dedicated for consuming and
  >>   processing packets at the required rate.
  >>   +The amount of Tx retries on a vhost-user or vhost-user-client 
interface can be
  >> +shown with::
  >> +
  >> +  $ ovs-vsctl get Interface dpdkvhostclient0 statistics:tx_retries
  >> +
  >>   vhost-user Dequeue Zero Copy (experimental)
  >>   ---
  >> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
  >> index a380b6ffe..d3e02d389 100644
  >> --- a/lib/netdev-dpdk.c
  >> +++ b/lib/netdev-dpdk.c
  >> @@ -139,4 +139,10 @@ BUILD_ASSERT_DECL((MAX_NB_MBUF / 
ROUND_DOWN_POW2(MAX_NB_MBUF / MIN_NB_MBUF))
  >>   #define XSTAT_RX_JABBER_ERRORS   "rx_jabber_errors"
  >>   +/* Size of vHost custom stats. */
  >> +#define VHOST_STAT_TX_RETRIES_SIZE    1

  I think, it's better to rename to something like VHOST_CUSTOM_STATS_SIZE.


+1



  >> +
  >> +/* Name of vHost custom stats. */

  s/Name/Names/ ?

  >> +#define VHOST_STAT_TX_RETRIES    "tx_retries" > +
  >
  > The alignment of the defines above look odd as they are not aligned 
with the existing DPDK XSTAT name definitions. It's only minor, as Kevin is on 
leave I think this will be ok to change on commit if there are no objections.

  Sure.

  >
  > Regards
  > Ian
  >>   #define SOCKET0  0
  >>   @@ -434,7 +440,9 @@ struct netdev_dpdk {
  >>   PADDED_MEMBERS(CACHE_LINE_SIZE,
  >>   struct netdev_stats stats;
  >> +    /* Custom stat for retries when unable to transmit. */
  >> +    uint64_t tx_retries;
  >>   /* Protects stats */
  >>   rte_spinlock_t stats_lock;
  >> -    /* 44 pad bytes here. */
  >> +    /* 4 pad bytes here. */
  >>   );
  >>   @@ -1190,4 +1198,6 @@ common_construct(struct netdev *netdev, 
dpdk_port_t port_no,
  >>   dev->rte_xstats_ids_size = 0;
  >>   +    dev->tx_retries = 0;
  >> +
  >>   return 0;
  >>   }
  >> @@ -2381,4 +2391,5 @@ __netdev_dpdk_vhost_send(struct netdev *netdev, 
int qid,
  >>   netdev_dpdk_vhost_update_tx_counters(>stats, pkts, 
total_pkts,
  >>    cnt + dropped);
  >> +    dev->tx_retries += MIN(retries, VHOST_ENQ_RETRY_NUM);
  >>   rte_spinlock_unlock(>stats_lock);
  

Re: [ovs-dev] [PATCH v4 2/3] netdev-dpdk: Add custom stat for vhost tx retries.

2019-07-04 Thread Ian Stokes

On 7/4/2019 12:18 PM, Ilya Maximets wrote:

On 04.07.2019 14:06, David Marchand wrote:



On Thu, Jul 4, 2019 at 12:42 PM Ilya Maximets mailto:i.maxim...@samsung.com>> wrote:

 On 03.07.2019 18:03, Ian Stokes wrote:
 > On 7/2/2019 1:32 AM, Kevin Traynor wrote:
 >> vhost tx retries may occur, and it can be a sign that
 >> the guest is not optimally configured.
 >>
 >> Add a custom stat so a user will know if vhost tx retries are
 >> occurring and hence give a hint that guest config should be
 >> examined.
 >>
 >
 > Thanks Kevin, tests ok for me.
 >
 > Just a general comment on the design. In comparison to the previous 
approach proposed there seems to be more required with the custom stat approach 
below.
 >
 > This may be ok as the retry is very OVS DPDK specific and doesn;t come 
dor lets say DPDK (unlike the XTATS).
 >
 > @Ilya, whats your thoughts? Is this approach preferable for you rather 
than adding it to the general stats for all devices? (in which case I agree, they 
will not be used for dpdk types so will not be of use).

 I think, It's better to keep this in custom stats section since
 no other port types are going to use it in a near future.

 Have a few style/naming comments inline.

 >
 > One other minor comment below.
 >
 >> Signed-off-by: Kevin Traynor mailto:ktray...@redhat.com>>
 >> ---
 >>   Documentation/topics/dpdk/vhost-user.rst |  5 
 >>   lib/netdev-dpdk.c    | 38 +++-
 >>   2 files changed, 42 insertions(+), 1 deletion(-)
 >>
 >> diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
 >> index 5f393aced..368f44520 100644
 >> --- a/Documentation/topics/dpdk/vhost-user.rst
 >> +++ b/Documentation/topics/dpdk/vhost-user.rst
 >> @@ -521,4 +521,9 @@ The guest should also have sufficient cores 
dedicated for consuming and
 >>   processing packets at the required rate.
 >>   +The amount of Tx retries on a vhost-user or vhost-user-client 
interface can be
 >> +shown with::
 >> +
 >> +  $ ovs-vsctl get Interface dpdkvhostclient0 statistics:tx_retries
 >> +
 >>   vhost-user Dequeue Zero Copy (experimental)
 >>   ---
 >> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
 >> index a380b6ffe..d3e02d389 100644
 >> --- a/lib/netdev-dpdk.c
 >> +++ b/lib/netdev-dpdk.c
 >> @@ -139,4 +139,10 @@ BUILD_ASSERT_DECL((MAX_NB_MBUF / 
ROUND_DOWN_POW2(MAX_NB_MBUF / MIN_NB_MBUF))
 >>   #define XSTAT_RX_JABBER_ERRORS   "rx_jabber_errors"
 >>   +/* Size of vHost custom stats. */
 >> +#define VHOST_STAT_TX_RETRIES_SIZE    1

 I think, it's better to rename to something like VHOST_CUSTOM_STATS_SIZE.


+1



 >> +
 >> +/* Name of vHost custom stats. */

 s/Name/Names/ ?

 >> +#define VHOST_STAT_TX_RETRIES    "tx_retries" > +
 >
 > The alignment of the defines above look odd as they are not aligned with 
the existing DPDK XSTAT name definitions. It's only minor, as Kevin is on leave I 
think this will be ok to change on commit if there are no objections.

 Sure.

 >
 > Regards
 > Ian
 >>   #define SOCKET0  0
 >>   @@ -434,7 +440,9 @@ struct netdev_dpdk {
 >>   PADDED_MEMBERS(CACHE_LINE_SIZE,
 >>   struct netdev_stats stats;
 >> +    /* Custom stat for retries when unable to transmit. */
 >> +    uint64_t tx_retries;
 >>   /* Protects stats */
 >>   rte_spinlock_t stats_lock;
 >> -    /* 44 pad bytes here. */
 >> +    /* 4 pad bytes here. */
 >>   );
 >>   @@ -1190,4 +1198,6 @@ common_construct(struct netdev *netdev, 
dpdk_port_t port_no,
 >>   dev->rte_xstats_ids_size = 0;
 >>   +    dev->tx_retries = 0;
 >> +
 >>   return 0;
 >>   }
 >> @@ -2381,4 +2391,5 @@ __netdev_dpdk_vhost_send(struct netdev *netdev, 
int qid,
 >>   netdev_dpdk_vhost_update_tx_counters(>stats, pkts, 
total_pkts,
 >>    cnt + dropped);
 >> +    dev->tx_retries += MIN(retries, VHOST_ENQ_RETRY_NUM);
 >>   rte_spinlock_unlock(>stats_lock);
 >>   @@ -2818,4 +2829,27 @@ netdev_dpdk_get_custom_stats(const struct 
netdev *netdev,
 >>   }
 >>   +static int
 >> +netdev_dpdk_vhost_get_cu

Re: [ovs-dev] [PATCH v4 2/3] netdev-dpdk: Add custom stat for vhost tx retries.

2019-07-04 Thread Ian Stokes

On 7/4/2019 12:18 PM, Ilya Maximets wrote:

On 04.07.2019 14:06, David Marchand wrote:



On Thu, Jul 4, 2019 at 12:42 PM Ilya Maximets mailto:i.maxim...@samsung.com>> wrote:

 On 03.07.2019 18:03, Ian Stokes wrote:
 > On 7/2/2019 1:32 AM, Kevin Traynor wrote:
 >> vhost tx retries may occur, and it can be a sign that
 >> the guest is not optimally configured.
 >>
 >> Add a custom stat so a user will know if vhost tx retries are
 >> occurring and hence give a hint that guest config should be
 >> examined.
 >>
 >
 > Thanks Kevin, tests ok for me.
 >
 > Just a general comment on the design. In comparison to the previous 
approach proposed there seems to be more required with the custom stat approach 
below.
 >
 > This may be ok as the retry is very OVS DPDK specific and doesn;t come 
dor lets say DPDK (unlike the XTATS).
 >
 > @Ilya, whats your thoughts? Is this approach preferable for you rather 
than adding it to the general stats for all devices? (in which case I agree, they 
will not be used for dpdk types so will not be of use).

 I think, It's better to keep this in custom stats section since
 no other port types are going to use it in a near future.

 Have a few style/naming comments inline.


The changes below all seem reasonable, I can apply and validate before 
committing if people are happy with that?


Ian



 >
 > One other minor comment below.
 >
 >> Signed-off-by: Kevin Traynor mailto:ktray...@redhat.com>>
 >> ---
 >>   Documentation/topics/dpdk/vhost-user.rst |  5 
 >>   lib/netdev-dpdk.c    | 38 +++-
 >>   2 files changed, 42 insertions(+), 1 deletion(-)
 >>
 >> diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
 >> index 5f393aced..368f44520 100644
 >> --- a/Documentation/topics/dpdk/vhost-user.rst
 >> +++ b/Documentation/topics/dpdk/vhost-user.rst
 >> @@ -521,4 +521,9 @@ The guest should also have sufficient cores 
dedicated for consuming and
 >>   processing packets at the required rate.
 >>   +The amount of Tx retries on a vhost-user or vhost-user-client 
interface can be
 >> +shown with::
 >> +
 >> +  $ ovs-vsctl get Interface dpdkvhostclient0 statistics:tx_retries
 >> +
 >>   vhost-user Dequeue Zero Copy (experimental)
 >>   ---
 >> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
 >> index a380b6ffe..d3e02d389 100644
 >> --- a/lib/netdev-dpdk.c
 >> +++ b/lib/netdev-dpdk.c
 >> @@ -139,4 +139,10 @@ BUILD_ASSERT_DECL((MAX_NB_MBUF / 
ROUND_DOWN_POW2(MAX_NB_MBUF / MIN_NB_MBUF))
 >>   #define XSTAT_RX_JABBER_ERRORS   "rx_jabber_errors"
 >>   +/* Size of vHost custom stats. */
 >> +#define VHOST_STAT_TX_RETRIES_SIZE    1

 I think, it's better to rename to something like VHOST_CUSTOM_STATS_SIZE.


+1



 >> +
 >> +/* Name of vHost custom stats. */

 s/Name/Names/ ?

 >> +#define VHOST_STAT_TX_RETRIES    "tx_retries" > +
 >
 > The alignment of the defines above look odd as they are not aligned with 
the existing DPDK XSTAT name definitions. It's only minor, as Kevin is on leave I 
think this will be ok to change on commit if there are no objections.

 Sure.

 >
 > Regards
 > Ian
 >>   #define SOCKET0  0
 >>   @@ -434,7 +440,9 @@ struct netdev_dpdk {
 >>   PADDED_MEMBERS(CACHE_LINE_SIZE,
 >>   struct netdev_stats stats;
 >> +    /* Custom stat for retries when unable to transmit. */
 >> +    uint64_t tx_retries;
 >>   /* Protects stats */
 >>   rte_spinlock_t stats_lock;
 >> -    /* 44 pad bytes here. */
 >> +    /* 4 pad bytes here. */
 >>   );
 >>   @@ -1190,4 +1198,6 @@ common_construct(struct netdev *netdev, 
dpdk_port_t port_no,
 >>   dev->rte_xstats_ids_size = 0;
 >>   +    dev->tx_retries = 0;
 >> +
 >>   return 0;
 >>   }
 >> @@ -2381,4 +2391,5 @@ __netdev_dpdk_vhost_send(struct netdev *netdev, 
int qid,
 >>   netdev_dpdk_vhost_update_tx_counters(>stats, pkts, 
total_pkts,
 >>    cnt + dropped);
 >> +    dev->tx_retries += MIN(retries, VHOST_ENQ_RETRY_NUM);
 >>   rte_spinlock_unlock(>stats_lock);
 >>   @@ -2818,4 +2829,27 @@ netdev_dpdk_get_custom

Re: [ovs-dev] [PATCH v4 3/3] netdev-dpdk: Enable vhost-tx-retries config.

2019-07-04 Thread Ian Stokes

On 7/4/2019 12:15 PM, Ilya Maximets wrote:

Few comments inline.
Probably, could be fixed while applying the patch.


Ok, these look reasonable to me. I can apply them this evening before 
committing.


If I add these will I had an ACK for you Ilya?

Regards
Ian


On 02.07.2019 3:32, Kevin Traynor wrote:

vhost tx retries can provide some mitigation against
dropped packets due to a temporarily slow guest/limited queue
size for an interface, but on the other hand when a system
is fully loaded those extra cycles retrying could mean
packets are dropped elsewhere.

Up to now max vhost tx retries have been hardcoded, which meant
no tuning and no way to disable for debugging to see if extra
cycles spent retrying resulted in rx drops on some other
interface.

Add an option to change the max retries, with a value of
0 effectively disabling vhost tx retries.

Signed-off-by: Kevin Traynor 
Acked-by: Eelco Chaudron 
Acked-by: Flavio Leitner 
---
  Documentation/topics/dpdk/vhost-user.rst | 28 +
  lib/netdev-dpdk.c| 39 +---
  vswitchd/vswitch.xml | 12 
  3 files changed, 75 insertions(+), 4 deletions(-)

diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index 368f44520..724aa62f6 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -351,4 +351,29 @@ The default value is ``false``.
  .. _dpdk-testpmd:
  
+vhost-user-client tx retries config

+~~~
+
+For vhost-user-client interfaces, the max amount of retries can be changed from
+the default 8 by setting ``tx-retries-max``.
+
+The minimum is 0 which means there will be no retries and if any packets in
+each batch cannot be sent immediately they will be dropped. The maximum is 32,
+which would mean that after the first packet(s) in the batch was sent there
+could be a maximum of 32 more retries.
+
+Retries can help with avoiding packet loss when temporarily unable to send to a
+vhost interface because the virtqueue is full. However, spending more time
+retrying to send to one interface, will reduce the time available for rx/tx and
+processing packets on other interfaces, so some tuning may be required for best
+performance.
+
+Tx retries max can be set for vhost-user-client ports::
+
+$ ovs-vsctl set Interface vhost-client-1 options:tx-retries-max=0
+
+.. note::
+
+  Configurable vhost tx retries are not supported with vhost-user ports.
+
  DPDK in the Guest
  -
@@ -496,4 +521,7 @@ packets can be sent, it may mean the guest is not accepting 
packets, so there
  are no (more) retries.
  
+For information about configuring the maximum amount of tx retries for

+vhost-user-client interfaces see `vhost-user-client tx retries config`_.
+
  .. note::
  
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c

index d3e02d389..b8592962f 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -165,5 +165,10 @@ typedef uint16_t dpdk_port_t;
  #define DPDK_PORT_ID_FMT "%"PRIu16
  
-#define VHOST_ENQ_RETRY_NUM 8

+/* Minimum amount of vhost tx retries, effectively a disable. */
+#define VHOST_ENQ_RETRY_MIN 0
+/* Maximum amount of vhost tx retries. */
+#define VHOST_ENQ_RETRY_MAX 32
+/* Legacy default value for vhost tx retries. */
+#define VHOST_ENQ_RETRY_DEF 8


An empty line would be nice here.


  #define IF_NAME_SZ (PATH_MAX > IFNAMSIZ ? PATH_MAX : IFNAMSIZ)
  
@@ -418,5 +423,7 @@ struct netdev_dpdk {

  /* True if vHost device is 'up' and has been reconfigured at least 
once */
  bool vhost_reconfigured;
-/* 3 pad bytes here. */
+
+atomic_uint8_t vhost_tx_retries_max;
+/* 2 pad bytes here. */
  );
  
@@ -1262,4 +1269,6 @@ vhost_common_construct(struct netdev *netdev)

  }
  
+atomic_store_relaxed(>vhost_tx_retries_max, VHOST_ENQ_RETRY_DEF);


This should be atomic_init().


+
  return common_construct(netdev, DPDK_ETH_PORT_ID_INVALID,
  DPDK_DEV_VHOST, socket_id);
@@ -1922,4 +1931,5 @@ netdev_dpdk_vhost_client_set_config(struct netdev *netdev,
  struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
  const char *path;
+int max_tx_retries, cur_max_tx_retries;
  
  ovs_mutex_lock(>mutex);

@@ -1938,4 +1948,17 @@ netdev_dpdk_vhost_client_set_config(struct netdev 
*netdev,
  }
  }
+
+max_tx_retries = smap_get_int(args, "tx-retries-max",
+  VHOST_ENQ_RETRY_DEF);
+if (max_tx_retries < VHOST_ENQ_RETRY_MIN
+|| max_tx_retries > VHOST_ENQ_RETRY_MAX) {
+max_tx_retries = VHOST_ENQ_RETRY_DEF;
+}
+atomic_read_relaxed(>vhost_tx_retries_max, _max_tx_retries);
+if (max_tx_retries != cur_max_tx_retries) {
+atomic_store_relaxed(>vhost_tx_retries_max, max_tx_retries);
+VLOG_INFO("Max Tx retries for vhost device '%s' set to %d",
+  dev->up.name, 

Re: [ovs-dev] [PATCH v1] doc: Remove experimental tag for SMC cache.

2019-07-04 Thread Ian Stokes

On 7/4/2019 11:12 AM, Ilya Maximets wrote:

On 03.07.2019 19:58, Ian Stokes wrote:

On 6/27/2019 12:44 PM, Yipeng Wang wrote:

SMC cache was introduced in 2.10 with experimental tag.
SMC cache is a layer of software cache located after EMC
cache. The purpose is to improve the performance of use
cases that many flows missing the EMC cache.

One can enable SMC cache using smc-enable=true option.



Thanks for this Yipeng.

I'd raised the topic of removing the experimental tag at the community call 
previously.

I guess two aspects were called out that form part of the litmus test for when 
the tag should be removed.

1. Is the feature in use in common/commercial use?
2. Are there any to-dos or known bugs to be resolved?

WRT point 1, I do believe it has been used/tested in commercial deployments and 
has been benchmarked against realistic deployments with positive results over 
EMC (except when there is only a small number of flows). I believe this was 
even presented by Red Hat at the OVS conference last year, so this is 
encouraging.

WRT to known bugs I'm not aware of any outstanding. There have been a handful 
of patches upstreamed since 2.10 to address some minor issues.

I think it's ok to remove this tag for the 2.12 release.

Would be interested to hear others thoughts?


Hi, Ian and Yipeng.

SMC seems stable enough now. Since fixing one major bug last year I
didn't noticed about new issues, however I didn't try to use it in
long-living setups.
This change doesn't enable SMC by default, so it's totally OK for
me to remove the experimental tag. This way we'll, probably, have
more users of this feature and subsequently more testing that will
allow us to enable it by default for a next releases.



Thanks Ilya, I agree, its seems to be a natural first step before 
replacing EMC.



So, idea is good. One comment inline for the patch itself. And
rebase is needed also.

Best regards, Ilya Maximets.



Regards
Ian


Signed-off-by: Yipeng Wang 
---
   Documentation/topics/dpdk/bridge.rst | 4 ++--
   NEWS | 1 +
   2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/topics/dpdk/bridge.rst 
b/Documentation/topics/dpdk/bridge.rst
index a3ed926..71e1af6 100644
--- a/Documentation/topics/dpdk/bridge.rst
+++ b/Documentation/topics/dpdk/bridge.rst
@@ -117,7 +117,7 @@ It is also possible to enable/disable EMC on per-port basis 
using::
   For more information on the EMC refer to :doc:`/intro/install/dpdk` .
     -SMC cache (experimental)
+SMC cache
   -


Above line should be shortened according to the new section name
to be rST compliant, otherwise it will trigger a warning/error
while docs generation.


+1

Regards
Ian



     SMC cache or signature match cache is a new cache level after EMC cache.
@@ -125,7 +125,7 @@ The difference between SMC and EMC is SMC only stores a 
signature of a flow
   thus it is much more memory efficient. With same memory space, EMC can store 
8k
   flows while SMC can store 1M flows. When traffic flow count is much larger 
than
   EMC size, it is generally beneficial to turn off EMC and turn on SMC. It is
-currently turned off by default and an experimental feature.
+currently turned off by default.
     To turn on SMC::
   diff --git a/NEWS b/NEWS
index 2f8171f..bf99295 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,7 @@ Post-v2.11.0
    * New action "check_pkt_len".
    * Port configuration with "other-config:priority-tags" now has a mode
  that retains the 802.1Q header even if VLAN and priority are both 
zero.
+ * Removed experimental tag for SMC cache.
  - OVSDB:
    * OVSDB clients can now resynchronize with clustered servers much more
  quickly after a brief disconnection, saving bandwidth and CPU time.







___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v1] doc: Remove experimental tag for SMC cache.

2019-07-03 Thread Ian Stokes

On 6/27/2019 12:44 PM, Yipeng Wang wrote:

SMC cache was introduced in 2.10 with experimental tag.
SMC cache is a layer of software cache located after EMC
cache. The purpose is to improve the performance of use
cases that many flows missing the EMC cache.

One can enable SMC cache using smc-enable=true option.



Thanks for this Yipeng.

I'd raised the topic of removing the experimental tag at the community 
call previously.


I guess two aspects were called out that form part of the litmus test 
for when the tag should be removed.


1. Is the feature in use in common/commercial use?
2. Are there any to-dos or known bugs to be resolved?

WRT point 1, I do believe it has been used/tested in commercial 
deployments and has been benchmarked against realistic deployments with 
positive results over EMC (except when there is only a small number of 
flows). I believe this was even presented by Red Hat at the OVS 
conference last year, so this is encouraging.


WRT to known bugs I'm not aware of any outstanding. There have been a 
handful of patches upstreamed since 2.10 to address some minor issues.


I think it's ok to remove this tag for the 2.12 release.

Would be interested to hear others thoughts?

Regards
Ian


Signed-off-by: Yipeng Wang 
---
  Documentation/topics/dpdk/bridge.rst | 4 ++--
  NEWS | 1 +
  2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/topics/dpdk/bridge.rst 
b/Documentation/topics/dpdk/bridge.rst
index a3ed926..71e1af6 100644
--- a/Documentation/topics/dpdk/bridge.rst
+++ b/Documentation/topics/dpdk/bridge.rst
@@ -117,7 +117,7 @@ It is also possible to enable/disable EMC on per-port basis 
using::
  For more information on the EMC refer to :doc:`/intro/install/dpdk` .
  
  
-SMC cache (experimental)

+SMC cache
  -
  
  SMC cache or signature match cache is a new cache level after EMC cache.

@@ -125,7 +125,7 @@ The difference between SMC and EMC is SMC only stores a 
signature of a flow
  thus it is much more memory efficient. With same memory space, EMC can store 
8k
  flows while SMC can store 1M flows. When traffic flow count is much larger 
than
  EMC size, it is generally beneficial to turn off EMC and turn on SMC. It is
-currently turned off by default and an experimental feature.
+currently turned off by default.
  
  To turn on SMC::
  
diff --git a/NEWS b/NEWS

index 2f8171f..bf99295 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,7 @@ Post-v2.11.0
   * New action "check_pkt_len".
   * Port configuration with "other-config:priority-tags" now has a mode
 that retains the 802.1Q header even if VLAN and priority are both zero.
+ * Removed experimental tag for SMC cache.
 - OVSDB:
   * OVSDB clients can now resynchronize with clustered servers much more
 quickly after a brief disconnection, saving bandwidth and CPU time.



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v4 3/3] netdev-dpdk: Enable vhost-tx-retries config.

2019-07-03 Thread Ian Stokes

On 7/2/2019 1:32 AM, Kevin Traynor wrote:

vhost tx retries can provide some mitigation against
dropped packets due to a temporarily slow guest/limited queue
size for an interface, but on the other hand when a system
is fully loaded those extra cycles retrying could mean
packets are dropped elsewhere.
 > Up to now max vhost tx retries have been hardcoded, which meant
no tuning and no way to disable for debugging to see if extra
cycles spent retrying resulted in rx drops on some other
interface.

Add an option to change the max retries, with a value of
0 effectively disabling vhost tx retries.



Thanks for the patch Kevin. Tests ok for me. I realize your on leave but 
there's a few minor comments below. If there are no objection by those 
who have either acked or are reviewing I can add them on commit.



Signed-off-by: Kevin Traynor 
Acked-by: Eelco Chaudron 
Acked-by: Flavio Leitner 
---
  Documentation/topics/dpdk/vhost-user.rst | 28 +
  lib/netdev-dpdk.c| 39 +---
  vswitchd/vswitch.xml | 12 


Probably a minor entry in NEWS for this additional feature needed also. 
As Kevin is on leave this can be added on commit if there is no objection.



  3 files changed, 75 insertions(+), 4 deletions(-)

diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index 368f44520..724aa62f6 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -351,4 +351,29 @@ The default value is ``false``.
  .. _dpdk-testpmd:
  
+vhost-user-client tx retries config

+~~~
+
+For vhost-user-client interfaces, the max amount of retries can be changed from
+the default 8 by setting ``tx-retries-max``.
+
+The minimum is 0 which means there will be no retries and if any packets in
+each batch cannot be sent immediately they will be dropped. The maximum is 32,
+which would mean that after the first packet(s) in the batch was sent there
+could be a maximum of 32 more retries.
+
+Retries can help with avoiding packet loss when temporarily unable to send to a
+vhost interface because the virtqueue is full. However, spending more time
+retrying to send to one interface, will reduce the time available for rx/tx and
+processing packets on other interfaces, so some tuning may be required for best
+performance.
+
+Tx retries max can be set for vhost-user-client ports::
+
+$ ovs-vsctl set Interface vhost-client-1 options:tx-retries-max=0


Minor, the commit message enables vhost-tx-retries, but the config 
option is tx-retries-max. I think vhost-tx-retries comes from the 
previous revision of the patch. This can be changed on commit if there 
is no objection.


Regards
Ian


+
+.. note::
+
+  Configurable vhost tx retries are not supported with vhost-user ports.
+
  DPDK in the Guest
  -
@@ -496,4 +521,7 @@ packets can be sent, it may mean the guest is not accepting 
packets, so there
  are no (more) retries.
  
+For information about configuring the maximum amount of tx retries for

+vhost-user-client interfaces see `vhost-user-client tx retries config`_.
+
  .. note::
  
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c

index d3e02d389..b8592962f 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -165,5 +165,10 @@ typedef uint16_t dpdk_port_t;
  #define DPDK_PORT_ID_FMT "%"PRIu16
  
-#define VHOST_ENQ_RETRY_NUM 8

+/* Minimum amount of vhost tx retries, effectively a disable. */
+#define VHOST_ENQ_RETRY_MIN 0
+/* Maximum amount of vhost tx retries. */
+#define VHOST_ENQ_RETRY_MAX 32
+/* Legacy default value for vhost tx retries. */
+#define VHOST_ENQ_RETRY_DEF 8
  #define IF_NAME_SZ (PATH_MAX > IFNAMSIZ ? PATH_MAX : IFNAMSIZ)
  
@@ -418,5 +423,7 @@ struct netdev_dpdk {

  /* True if vHost device is 'up' and has been reconfigured at least 
once */
  bool vhost_reconfigured;
-/* 3 pad bytes here. */
+
+atomic_uint8_t vhost_tx_retries_max;
+/* 2 pad bytes here. */
  );
  
@@ -1262,4 +1269,6 @@ vhost_common_construct(struct netdev *netdev)

  }
  
+atomic_store_relaxed(>vhost_tx_retries_max, VHOST_ENQ_RETRY_DEF);

+
  return common_construct(netdev, DPDK_ETH_PORT_ID_INVALID,
  DPDK_DEV_VHOST, socket_id);
@@ -1922,4 +1931,5 @@ netdev_dpdk_vhost_client_set_config(struct netdev *netdev,
  struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
  const char *path;
+int max_tx_retries, cur_max_tx_retries;
  
  ovs_mutex_lock(>mutex);

@@ -1938,4 +1948,17 @@ netdev_dpdk_vhost_client_set_config(struct netdev 
*netdev,
  }
  }
+
+max_tx_retries = smap_get_int(args, "tx-retries-max",
+  VHOST_ENQ_RETRY_DEF);
+if (max_tx_retries < VHOST_ENQ_RETRY_MIN
+|| max_tx_retries > VHOST_ENQ_RETRY_MAX) {
+max_tx_retries = VHOST_ENQ_RETRY_DEF;
+}
+

Re: [ovs-dev] [PATCH v4 2/3] netdev-dpdk: Add custom stat for vhost tx retries.

2019-07-03 Thread Ian Stokes

On 7/2/2019 1:32 AM, Kevin Traynor wrote:

vhost tx retries may occur, and it can be a sign that
the guest is not optimally configured.

Add a custom stat so a user will know if vhost tx retries are
occurring and hence give a hint that guest config should be
examined.



Thanks Kevin, tests ok for me.

Just a general comment on the design. In comparison to the previous 
approach proposed there seems to be more required with the custom stat 
approach below.


This may be ok as the retry is very OVS DPDK specific and doesn;t come 
dor lets say DPDK (unlike the XTATS).


@Ilya, whats your thoughts? Is this approach preferable for you rather 
than adding it to the general stats for all devices? (in which case I 
agree, they will not be used for dpdk types so will not be of use).


One other minor comment below.


Signed-off-by: Kevin Traynor 
---
  Documentation/topics/dpdk/vhost-user.rst |  5 
  lib/netdev-dpdk.c| 38 +++-
  2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index 5f393aced..368f44520 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -521,4 +521,9 @@ The guest should also have sufficient cores dedicated for 
consuming and
  processing packets at the required rate.
  
+The amount of Tx retries on a vhost-user or vhost-user-client interface can be

+shown with::
+
+  $ ovs-vsctl get Interface dpdkvhostclient0 statistics:tx_retries
+
  vhost-user Dequeue Zero Copy (experimental)
  ---
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index a380b6ffe..d3e02d389 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -139,4 +139,10 @@ BUILD_ASSERT_DECL((MAX_NB_MBUF / 
ROUND_DOWN_POW2(MAX_NB_MBUF / MIN_NB_MBUF))
  #define XSTAT_RX_JABBER_ERRORS   "rx_jabber_errors"
  
+/* Size of vHost custom stats. */

+#define VHOST_STAT_TX_RETRIES_SIZE1
+
+/* Name of vHost custom stats. */
+#define VHOST_STAT_TX_RETRIES"tx_retries" > +


The alignment of the defines above look odd as they are not aligned with 
the existing DPDK XSTAT name definitions. It's only minor, as Kevin is 
on leave I think this will be ok to change on commit if there are no 
objections.


Regards
Ian

  #define SOCKET0  0
  
@@ -434,7 +440,9 @@ struct netdev_dpdk {

  PADDED_MEMBERS(CACHE_LINE_SIZE,
  struct netdev_stats stats;
+/* Custom stat for retries when unable to transmit. */
+uint64_t tx_retries;
  /* Protects stats */
  rte_spinlock_t stats_lock;
-/* 44 pad bytes here. */
+/* 4 pad bytes here. */
  );
  
@@ -1190,4 +1198,6 @@ common_construct(struct netdev *netdev, dpdk_port_t port_no,

  dev->rte_xstats_ids_size = 0;
  
+dev->tx_retries = 0;

+
  return 0;
  }
@@ -2381,4 +2391,5 @@ __netdev_dpdk_vhost_send(struct netdev *netdev, int qid,
  netdev_dpdk_vhost_update_tx_counters(>stats, pkts, total_pkts,
   cnt + dropped);
+dev->tx_retries += MIN(retries, VHOST_ENQ_RETRY_NUM);
  rte_spinlock_unlock(>stats_lock);
  
@@ -2818,4 +2829,27 @@ netdev_dpdk_get_custom_stats(const struct netdev *netdev,

  }
  
+static int

+netdev_dpdk_vhost_get_custom_stats(const struct netdev *netdev,
+   struct netdev_custom_stats *custom_stats)
+{
+struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
+
+ovs_mutex_lock(>mutex);
+
+custom_stats->size = VHOST_STAT_TX_RETRIES_SIZE;
+custom_stats->counters = (struct netdev_custom_counter *)
+ xzalloc(sizeof(struct netdev_custom_counter));
+ovs_strlcpy(custom_stats->counters->name, VHOST_STAT_TX_RETRIES,
+NETDEV_CUSTOM_STATS_NAME_SIZE);
+
+rte_spinlock_lock(>stats_lock);
+custom_stats->counters->value = dev->tx_retries;
+rte_spinlock_unlock(>stats_lock);
+
+ovs_mutex_unlock(>mutex);
+
+return 0;
+}
+
  static int
  netdev_dpdk_get_features(const struct netdev *netdev,
@@ -4398,4 +4432,5 @@ static const struct netdev_class dpdk_vhost_class = {
  .get_carrier = netdev_dpdk_vhost_get_carrier,
  .get_stats = netdev_dpdk_vhost_get_stats,
+.get_custom_stats = netdev_dpdk_vhost_get_custom_stats,
  .get_status = netdev_dpdk_vhost_user_get_status,
  .reconfigure = netdev_dpdk_vhost_reconfigure,
@@ -4413,4 +4448,5 @@ static const struct netdev_class dpdk_vhost_client_class 
= {
  .get_carrier = netdev_dpdk_vhost_get_carrier,
  .get_stats = netdev_dpdk_vhost_get_stats,
+.get_custom_stats = netdev_dpdk_vhost_get_custom_stats,
  .get_status = netdev_dpdk_vhost_user_get_status,
  .reconfigure = netdev_dpdk_vhost_client_reconfigure,



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v4 1/3] doc: Move vhost tx retry info to separate section.

2019-07-02 Thread Ian Stokes

On 7/2/2019 1:32 AM, Kevin Traynor wrote:

vhost tx retry is applicable to vhost-user and vhost-user-client,
but was in the section that compares them. Also, moved further
down the doc as prefer to have more fundamental info about vhost
nearer the top.

Fixes: 6d6513bfc657 ("doc: Add info on vhost tx retries.")
Reported-by: David Marchand 
Signed-off-by: Kevin Traynor 
---
  Documentation/topics/dpdk/vhost-user.rst | 72 
  1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index a6cf9d1cc..5f393aced 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -76,40 +76,4 @@ mode ports require QEMU version 2.7.  Ports of type 
vhost-user are currently
  deprecated and will be removed in a future release.
  
-vhost tx retries

-
-
-When sending a batch of packets to a vhost-user or vhost-user-client interface,
-it may happen that some but not all of the packets in the batch are able to be
-sent to the guest. This is often because there is not enough free descriptors
-in the virtqueue for all the packets in the batch to be sent. In this case
-there will be a retry, with a default maximum of 8 occurring. If at any time no
-packets can be sent, it may mean the guest is not accepting packets, so there
-are no (more) retries.
-
-.. note::
-
-  Maximum vhost tx batch size is defined by NETDEV_MAX_BURST, and is currently
-  as 32.
-
-Tx Retries may be reduced or even avoided by some external configuration, such
-as increasing the virtqueue size through the ``rx_queue_size`` parameter
-introduced in QEMU 2.7.0 / libvirt 2.3.0::
-
-  
-  
-  
-  
-  
-  
-  
-
-The guest application will also need need to provide enough descriptors. For
-example with ``testpmd`` the command line argument can be used::
-
- --rxd=1024 --txd=1024
-
-The guest should also have sufficient cores dedicated for consuming and
-processing packets at the required rate.
-
  .. _dpdk-vhost-user:
  
@@ -521,4 +485,40 @@ DPDK vHost User ports can be configured to use Jumbo Frames. For more

  information, refer to :doc:`jumbo-frames`.
  
+vhost tx retries

+
+
+When sending a batch of packets to a vhost-user or vhost-user-client interface,
+it may happen that some but not all of the packets in the batch are able to be
+sent to the guest. This is often because there is not enough free descriptors
+in the virtqueue for all the packets in the batch to be sent. In this case
+there will be a retry, with a default maximum of 8 occurring. If at any time no
+packets can be sent, it may mean the guest is not accepting packets, so there
+are no (more) retries.
+
+.. note::
+
+  Maximum vhost tx batch size is defined by NETDEV_MAX_BURST, and is currently
+  as 32.
+
+Tx Retries may be reduced or even avoided by some external configuration, such
+as increasing the virtqueue size through the ``rx_queue_size`` parameter
+introduced in QEMU 2.7.0 / libvirt 2.3.0::
+
+  
+  
+  
+  
+  
+  
+  
+
+The guest application will also need need to provide enough descriptors. For
+example with ``testpmd`` the command line argument can be used::
+
+ --rxd=1024 --txd=1024
+
+The guest should also have sufficient cores dedicated for consuming and
+processing packets at the required rate.
+


Looks ok to me.

@David as this was suggested by you, are you happy with the change?

Thanks
Ian


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] criteria/benchmarks for an improved userspace datapath classifier?

2019-07-02 Thread Ian Stokes

On 7/2/2019 6:00 PM, Ben Pfaff wrote:

Hi Ilya and Ian.  Please allow me to introduce Michal Orsak, a grad
student currently looking at packet classifiers.  He's implemented a
novel classifier that is faster than the one already in OVS in the
benchmarks that he's run.  His classifier is tree-based, like most
high-performance classifiers, but also incremental so that flows can be
inserted and deleted individually without undue delay.  Ultimately, it
might make sense to replace the OVS userspace datapath classifier by one
based on the concepts that he's come up with.


Thanks for the introduction Ben. I wasn't aware of Michals work. The 
timing is quite apt as currently I've been looking at Harrys (CCd) 
approach to improving performance for the current DPCLS.


https://mail.openvswitch.org/pipermail/ovs-dev/2019-May/358790.html

I was hoping to have this approach in place for OVS 2.12 as there's been 
ongoing testing/reviews across the community with general improvements 
of ~ 15% or more for both x86 and ARM architectures which looks promising.


I'd be interested in seeing Michals proposals if there are patches 
available that would be great.




A difficulty with classifiers, however, is coming up with an appropriate
set of benchmarks to compare them fairly.  The userspace datapath
focuses on performance, so do you have a set of benchmarks that you
recommend for comparison?  Are there other criteria that would be
important (besides correctness)?


Agreed, that's something we've been looking for feedback on from the 
community to date. Most testing we have seen have been performance focused.


The areas I think that would be good to measure would be flow 
addition/flow deletion overhead in CPU cycles. Also memory and time 
complexity comparisons for existing and proposed techniques might be 
nice to see.


Thanks
Ian



(I'd take answers from anyone, not just Ian and Ilya!)

Thanks,

Ben.



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v9 1/5] dpif-netdev: implement function pointers/subtable

2019-07-02 Thread Ian Stokes

On 7/2/2019 4:02 PM, Van Haaren, Harry wrote:

-Original Message-
From: Stokes, Ian
Sent: Tuesday, July 2, 2019 3:40 PM
To: Van Haaren, Harry ; ovs-dev@openvswitch.org
Cc: i.maxim...@samsung.com
Subject: Re: [ovs-dev] [PATCH v9 1/5] dpif-netdev: implement function
pointers/subtable

On 5/15/2019 6:02 PM, Ian Stokes wrote:

On 5/8/2019 4:13 PM, Harry van Haaren wrote:

This allows plugging-in of different subtable hash-lookup-verify
routines, and allows special casing of those functions based on
known context (eg: # of bits set) of the specific subtable.

Signed-off-by: Harry van Haaren 

---

v9:
- Use count_1bits in favour of __builtin_popcount (Ilya)

v6:
- Implement subtable effort per packet "lookups_match" counter  (Ilya)
- Remove double newline (Eelco)
- Remove doubel * before comments (Eelco)
- Reword comments in dpcls_lookup() for clarity (Harry)
---
   lib/dpif-netdev.c | 135 +++---
   1 file changed, 93 insertions(+), 42 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 5a6f2abac..e2e2c14e7 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -7572,6 +7572,27 @@ dpif_dummy_register(enum dummy_level level)
   



   /* Datapath Classifier. */
+/* forward declaration for lookup_func typedef */


Minor nit above, general rule of thumb for comment style, start with
capital letter and finish with period.


+struct dpcls_subtable;
+
+/* Lookup function for a subtable in the dpcls. This function is called
+ * by each subtable with an array of packets, and a bitmask of
packets to
+ * perform the lookup on. Using a function pointer gives flexibility to
+ * optimize the lookup function based on subtable properties and the
+ * CPU instruction set available at runtime.
+ */
+typedef uint32_t (*dpcls_subtable_lookup_func)(struct dpcls_subtable
*subtable,
+    uint32_t keys_map, const struct netdev_flow_key *keys[],
+    struct dpcls_rule **rules);


Alignment for the arguments above looks odd, typically arguments are
kept vertically in line with one another *similar to
dpcls_subtable_lookup_generic below).


+
+/* Prototype for generic lookup func, using same code path as before */


Period at end of comment above.


+uint32_t
+dpcls_subtable_lookup_generic(struct dpcls_subtable *subtable,
+  uint32_t keys_map,
+  const struct netdev_flow_key *keys[],
+  struct dpcls_rule **rules);
+
+


One minor follow up, extra whitespace seems to have been added here, cab
be reduced to 1 new line.


Will fix.






+    uint32_t pkts_matched = count_1bits(found_map);


Just to clarify, at this point found_map has been returned and it only
contains matches where packets were found? i.e. it doesn't contain
matches from possible hash collisions?


+    lookups_match += pkts_matched * subtable_pos;


Hi Harry, can you clarify above why '* subtable_pos' is used? Is that
right? I'm just thinking that you already have the number of packets
matched from the count_1bits(found_map).


The "lookups match" counter variable name is a bit misleading, but I'd
change it in this patchset as its orthogonal to the DPCLS function pointer
concept.

The counter counts "number of subtables searched per hit packet", so to
speak. See Ilya's input and my response here:
https://www.mail-archive.com/ovs-dev@openvswitch.org/msg31442.html

This is a pseudo code of expected behavior:
1st subtable packet hits are += 1,
2nd subtable packet hits are += 2,
3rd subtable packet hits are += 3  etc.

At the end of a burst, we have a bitmask of packets hit, and a counter for
"subtable effort per packet matched".

Given two experienced OVS folks asked ~ the same question, hints that its
time for a cleanup & refactor, perhaps even a /* descriptive comment */ :)



Ya that makes more sense, confirms what i suspected :).

Sure a description of the purpose would help here in the next revision.

Thanks
Ian


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v9 1/5] dpif-netdev: implement function pointers/subtable

2019-07-02 Thread Ian Stokes

On 5/15/2019 6:02 PM, Ian Stokes wrote:

On 5/8/2019 4:13 PM, Harry van Haaren wrote:

This allows plugging-in of different subtable hash-lookup-verify
routines, and allows special casing of those functions based on
known context (eg: # of bits set) of the specific subtable.

Signed-off-by: Harry van Haaren 

---

v9:
- Use count_1bits in favour of __builtin_popcount (Ilya)

v6:
- Implement subtable effort per packet "lookups_match" counter  (Ilya)
- Remove double newline (Eelco)
- Remove doubel * before comments (Eelco)
- Reword comments in dpcls_lookup() for clarity (Harry)
---
  lib/dpif-netdev.c | 135 +++---
  1 file changed, 93 insertions(+), 42 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 5a6f2abac..e2e2c14e7 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -7572,6 +7572,27 @@ dpif_dummy_register(enum dummy_level level)
  
  /* Datapath Classifier. */
+/* forward declaration for lookup_func typedef */


Minor nit above, general rule of thumb for comment style, start with 
capital letter and finish with period.



+struct dpcls_subtable;
+
+/* Lookup function for a subtable in the dpcls. This function is called
+ * by each subtable with an array of packets, and a bitmask of 
packets to

+ * perform the lookup on. Using a function pointer gives flexibility to
+ * optimize the lookup function based on subtable properties and the
+ * CPU instruction set available at runtime.
+ */
+typedef uint32_t (*dpcls_subtable_lookup_func)(struct dpcls_subtable 
*subtable,

+    uint32_t keys_map, const struct netdev_flow_key *keys[],
+    struct dpcls_rule **rules);


Alignment for the arguments above looks odd, typically arguments are 
kept vertically in line with one another *similar to 
dpcls_subtable_lookup_generic below).



+
+/* Prototype for generic lookup func, using same code path as before */


Period at end of comment above.


+uint32_t
+dpcls_subtable_lookup_generic(struct dpcls_subtable *subtable,
+  uint32_t keys_map,
+  const struct netdev_flow_key *keys[],
+  struct dpcls_rule **rules);
+
+


One minor follow up, extra whitespace seems to have been added here, cab 
be reduced to 1 new line.



  /* A set of rules that all have the same fields wildcarded. */
  struct dpcls_subtable {
  /* The fields are only used by writers. */
@@ -7581,6 +7602,13 @@ struct dpcls_subtable {
  struct cmap rules;   /* Contains "struct dpcls_rule"s. */
  uint32_t hit_cnt;    /* Number of match hits in subtable 
in current

  optimization interval. */
+
+    /* the lookup function to use for this subtable. If there is a known
+ * property of the subtable (eg: only 3 bits of miniflow metadata is
+ * used for the lookup) then this can point at an optimized 
version of

+ * the lookup function for this particular subtable. */

the -> The above.

+    dpcls_subtable_lookup_func lookup_func;
+
  struct netdev_flow_key mask; /* Wildcards for fields (const). */
  /* 'mask' must be the last field, additional space is allocated 
here. */

  };
@@ -7640,6 +7668,10 @@ dpcls_create_subtable(struct dpcls *cls, const 
struct netdev_flow_key *mask)

  cmap_init(>rules);
  subtable->hit_cnt = 0;
  netdev_flow_key_clone(>mask, mask);
+
+    /* decide which hash/lookup/verify function to use */
+    subtable->lookup_func = dpcls_subtable_lookup_generic;


So by default dpcls_subtable_lookup_generic is set as the look up 
function. Makes sense as this is the only look up available at this 
stage. I assume it's later in the series a mechanism to select a 
different lookup is introduced. Or by default does the lookup always 
start off as the generic option when a subtable is created even when 
other options are possible?



+
  cmap_insert(>subtables_map, >cmap_node, mask->hash);
  /* Add the new subtable at the end of the pvector (with no hits 
yet) */

  pvector_insert(>subtables, subtable, 0);
@@ -7800,6 +7832,53 @@ dpcls_rule_matches_key(const struct dpcls_rule 
*rule,

  return true;
  }
+uint32_t
+dpcls_subtable_lookup_generic(struct dpcls_subtable *subtable,
+  uint32_t keys_map,
+  const struct netdev_flow_key *keys[],
+  struct dpcls_rule **rules)
+{
+    int i;
+    /* Compute hashes for the remaining keys.  Each search-key is
+ * masked with the subtable's mask to avoid hashing the 
wildcarded

+ * bits. */
+    uint32_t hashes[NETDEV_MAX_BURST];
+    ULLONG_FOR_EACH_1(i, keys_map) {
+    hashes[i] = netdev_flow_key_hash_in_mask(keys[i],
+ >mask);
+    }
+
+    /* Lookup. */
+    const struct cma

Re: [ovs-dev] [PATCH v3 4/4] netdev-dpdk: Enable vhost-tx-retries config.

2019-06-28 Thread Ian Stokes

On 6/27/2019 12:12 PM, Kevin Traynor wrote:

vhost tx retries can provide some mitigation against
dropped packets due to a temporarily slow guest/limited queue
size for an interface, but on the other hand when a system
is fully loaded those extra cycles retrying could mean
packets are dropped elsewhere.

Up to now max vhost tx retries have been hardcoded, which meant
no tuning and no way to disable for debugging to see if extra
cycles spent retrying resulted in rx drops on some other
interface.

Add an option to change the max retries, with a value of
0 effectively disabling vhost tx retries.

Signed-off-by: Kevin Traynor 
---
  Documentation/topics/dpdk/vhost-user.rst | 25 
  lib/netdev-dpdk.c| 36 +---
  vswitchd/vswitch.xml | 10 +++
  3 files changed, 67 insertions(+), 4 deletions(-)

diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index 3caa88231..d8508d8f8 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -392,4 +392,29 @@ The default value is ``false``.
  .. _dpdk-testpmd:


I'm still testing this but a minor suggestion below.

in patch 2 of the series you introduce a section 'vhost tx retries' and 
you specify the behavior and number of default retries. It would be nice 
to link that section to this section below to flag to users that the 
default can be  changed. It should make navigation easy between the two 
points as currently they are separated in the doc by other configuration 
sections.


Something like

--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -82,8 +82,10 @@ When sending a batch of packets to a vhost-user or 
vhost-user-client interface,
 it may happen that some but not all of the packets in the batch are 
able to be
 sent to the guest. This is often because there is not enough free 
descriptors

 in the virtqueue for all the packets in the batch to be sent. In this case
-there will be a retry, with a default maximum of 8 occurring. If at any 
time no
-packets can be sent, it may mean the guest is not accepting packets, so 
there
+there will be a retry, with a default maximum of 8 occurring, for 
information

+regarding how this can be configured please refer to
+`vhost-user-client tx retries config`_. If at any time no packets can 
be sent,

+it may mean the guest is not accepting packets, so there
 are no (more) retries.

Ian

  
+vhost-user-client tx retries config

+~~~
+
+For vhost-user-client interfaces, the max amount of retries can be changed from
+the default 8 by setting ``vhost-tx-retries``.
+
+The minimum is 0 which means there will be no retries and if any packets in
+each batch cannot be sent immediately they will be dropped. The maximum is 32,
+which would mean that after the first packet(s) in the batch was sent there
+could be a maximum of 32 more retries.
+
+Retries can help with avoiding packet loss when temporarily unable to send to a
+vhost interface because the virtqueue is full. However, spending more time
+retrying to send to one interface, will reduce the time available for rx/tx and
+processing packets on other interfaces, so some tuning may be required for best
+performance.
+
+Tx retries can be set for vhost-user-client ports::
+
+$ ovs-vsctl set Interface vhost-client-1 options:vhost-tx-retries=0
+
+.. note::
+
+ Configurable vhost tx retries are not supported with vhost-user ports.
+
  DPDK in the Guest
  -
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 65161deaf..2befbf9a7 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -159,5 +159,10 @@ typedef uint16_t dpdk_port_t;
  #define DPDK_PORT_ID_FMT "%"PRIu16
  
-#define VHOST_ENQ_RETRY_NUM 8

+/* Minimum amount of vhost tx retries, effectively a disable. */
+#define VHOST_ENQ_RETRY_MIN 0
+/* Maximum amount of vhost tx retries. */
+#define VHOST_ENQ_RETRY_MAX 32
+/* Legacy default value for vhost tx retries. */
+#define VHOST_ENQ_RETRY_DEF 8
  #define IF_NAME_SZ (PATH_MAX > IFNAMSIZ ? PATH_MAX : IFNAMSIZ)
  
@@ -409,5 +414,6 @@ struct netdev_dpdk {

  /* True if vHost device is 'up' and has been reconfigured at least 
once */
  bool vhost_reconfigured;
-/* 3 pad bytes here. */
+atomic_uint8_t vhost_tx_retries;
+/* 2 pad bytes here. */
  );
  
@@ -1240,4 +1246,6 @@ vhost_common_construct(struct netdev *netdev)

  }
  
+atomic_store_relaxed(>vhost_tx_retries, VHOST_ENQ_RETRY_DEF);

+
  return common_construct(netdev, DPDK_ETH_PORT_ID_INVALID,
  DPDK_DEV_VHOST, socket_id);
@@ -1899,4 +1907,5 @@ netdev_dpdk_vhost_client_set_config(struct netdev *netdev,
  struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
  const char *path;
+int max_tx_retries, cur_max_tx_retries;
  
  ovs_mutex_lock(>mutex);

@@ -1915,4 

Re: [ovs-dev] [PATCH v3 2/4] doc: Add info on vhost tx retries.

2019-06-28 Thread Ian Stokes

On 6/27/2019 12:12 PM, Kevin Traynor wrote:

Add documentation about vhost tx retries and external
configuration that can help reduce/avoid them.

Signed-off-by: Kevin Traynor 
Acked-by: Eelco Chaudron 
Acked-by: Flavio Leitner 
---
  Documentation/topics/dpdk/vhost-user.rst | 36 
  1 file changed, 36 insertions(+)

diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index f7b4b338e..1dd02b8b6 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -76,4 +76,40 @@ mode ports require QEMU version 2.7.  Ports of type 
vhost-user are currently
  deprecated and will be removed in a future release.
  
+vhost tx retries

+
+
+When sending a batch of packets to a vhost-user or vhost-user-client interface,
+it may happen that some but not all of the packets in the batch are able to be
+sent to the guest. This is often because there is not enough free descriptors
+in the virtqueue for all the packets in the batch to be sent. In this case
+there will be a retry, with a default maximum of 8 occurring. If at any time no
+packets can be sent, it may mean the guest is not accepting packets, so there
+are no (more) retries.
+
+.. note::
+
+  Maximum vhost tx batch size is defined by NETDEV_MAX_BURST, and is currently
+  as 32.
+
+Tx Retries may be reduced or even avoided by some external configuration, such
+as increasing the virtqueue size through the ``rx_queue_size`` parameter
+introduced in QEMU 2.7.0 / libvirt 2.3.0::
+
+  
+  
+  
+  
+  
+  
+  
+
+The guest application will also need need to provide enough descriptors. For
+example with ``testpmd`` the command line argument can be used::
+
+ --rxd=1024 --txd=1024
+
+The guest should also have sufficient cores dedicated for consuming and
+processing packets at the required rate.
+
  .. _dpdk-vhost-user:


Thanks for working on the documentation, this is quite useful as 
typically it's insight you'd only get by being familiar with the 
netdev-dpdk code that users may not be aware of.


Pushed to master.

Regards
Ian


  



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 1/4] netdev-dpdk: Fix additional vhost tx retry.

2019-06-28 Thread Ian Stokes

On 6/28/2019 10:22 AM, Ian Stokes wrote:

On 6/25/2019 3:57 PM, Kevin Traynor wrote:

Fix minor issue of one possible additional retry.

Fixes: c6ec9d176dbf ("netdev-dpdk: Fix vHost stats.")
Signed-off-by: Kevin Traynor 
Acked-by: Eelco Chaudron 
---
  lib/netdev-dpdk.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 4856c56aa..0f3b9c6f4 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -2353,5 +2353,5 @@ __netdev_dpdk_vhost_send(struct netdev *netdev, 
int qid,

  break;
  }
-    } while (cnt && (retries++ <= VHOST_ENQ_RETRY_NUM));
+    } while (cnt && (retries++ < VHOST_ENQ_RETRY_NUM));
  rte_spinlock_unlock(>tx_q[qid].tx_lock);


Looks OK to me, can be backported to 2.7 as far as I can see as well. 
Applied an pushed.




Apologies, just spotted I've replied on the v2 thread, should be the v3.

Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 1/4] netdev-dpdk: Fix additional vhost tx retry.

2019-06-28 Thread Ian Stokes

On 6/25/2019 3:57 PM, Kevin Traynor wrote:

Fix minor issue of one possible additional retry.

Fixes: c6ec9d176dbf ("netdev-dpdk: Fix vHost stats.")
Signed-off-by: Kevin Traynor 
Acked-by: Eelco Chaudron 
---
  lib/netdev-dpdk.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 4856c56aa..0f3b9c6f4 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -2353,5 +2353,5 @@ __netdev_dpdk_vhost_send(struct netdev *netdev, int qid,
  break;
  }
-} while (cnt && (retries++ <= VHOST_ENQ_RETRY_NUM));
+} while (cnt && (retries++ < VHOST_ENQ_RETRY_NUM));
  
  rte_spinlock_unlock(>tx_q[qid].tx_lock);


Looks OK to me, can be backported to 2.7 as far as I can see as well. 
Applied an pushed.


Thanks
Ian


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v4] netdev-dpdk: Reset queue number for vhost devices on vm shutdown.

2019-06-27 Thread Ian Stokes

On 6/27/2019 3:51 PM, Ilya Maximets wrote:

On 27.06.2019 17:17, Ian Stokes wrote:

On 6/27/2019 10:43 AM, David Marchand wrote:

Rather than poll all disabled queues and waste some memory for vms that
have been shutdown, we can reconfigure when receiving a destroy
connection notification from the vhost library.

$ while true; do
    ovs-appctl dpif-netdev/pmd-rxq-show |awk '
    /port: / {
  tot++;
  if ($5 == "(enabled)") {
    en++;
  }
    }
    END {
  print "total: " tot ", enabled: " en
    }'
    sleep 1
done

total: 66, enabled: 66
total: 6, enabled: 2

This change requires a fix in the DPDK vhost library, so bump the minimal
required version to 18.11.2.


So in testing this I was seeing an error with the following

2019-06-27T10:00:08Z|00057|dpdk|INFO|VHOST_CONFIG: vhost peer closed
2019-06-27T10:00:08Z|00058|dpdk|ERR|VHOST_CONFIG: (0) device not found.
2019-06-27T10:00:08Z|00059|netdev_dpdk|INFO|vHost Device '' not found

It wasn't until I realized I was testing with DPDK 18.11.2.rc1 that it dawned 
on me the required fix wasn't there...doh!

So in short I can confirm the requirement for 18.11.2 :).

Is there any requirement on the QEMU version side for this patch also? Or has 
the functionality been in place on that side for quite some time but was just 
mishandled in DPDK?


'destroy_connection' is just a callback that is called when socket closed
by DPDK or QEMU. So, no dependency on QEMU version. > The reason of above issue with 18.11.1 is that dpdk destroyed device 

before

calling the 'destroy_connection' callback, so OVS wasn't able to find
corresponding port, because 'rte_vhost_get_ifname' always returned an empty
string.


Sure, I saw your patch in 18.11.2 and hence the minimal version move now.





One other minor query below but overall looks ok and has validated without 
issue.



Co-authored-by: Ilya Maximets 
Signed-off-by: Ilya Maximets 
Signed-off-by: David Marchand 
---
Changes since v3:
- rebased on master following 18.11.2 support
- added a note in NEWS about minimal dpdk version

Changes since v2:
- added authorship tags for Ilya
- added logs in destroy_connection

---
   NEWS  |  4 +++-
   lib/netdev-dpdk.c | 47 ++-
   2 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index c03e287..2f8171f 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,9 @@ Post-v2.11.0
    * New option 'other_config:dpdk-socket-limit' to limit amount of
  hugepage memory that can be used by DPDK.
    * Add support for vHost Post-copy Live Migration (experimental).
- * OVS validated with DPDK 18.11.2 which is recommended to be used.
+ * OVS validated with DPDK 18.11.2 which is the new minimal supported
+   version.
+ * DPDK 18.11.1 and lower is no longer supported.
  - OpenFlow:
    * All features required by OpenFlow 1.5 are now implemented, so
  ovs-vswitchd now enables OpenFlow 1.5 by default (in addition to
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index b7f4543..0b9bea4 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -185,12 +185,15 @@ static const struct rte_eth_conf port_conf = {
   static int new_device(int vid);
   static void destroy_device(int vid);
   static int vring_state_changed(int vid, uint16_t queue_id, int enable);
+static void destroy_connection(int vid);
   static const struct vhost_device_ops virtio_net_device_ops =
   {
   .new_device =  new_device,
   .destroy_device = destroy_device,
   .vring_state_changed = vring_state_changed,
-    .features_changed = NULL
+    .features_changed = NULL,
+    .new_connection = NULL,


I take it .new_connection is a requirement? It's just that it's added as NULL, 
but I assume it goes hand in hand with the introduction of .destroy connection?


'new_connection' was introduced in DPDK along with 'destroy_connection'.
Setting it as NULL here just to have a full list of callbacks as we
already have NULL 'features_changed'. To be consistent here we need to
add 'new_connection' or remove 'features_changed'.
Anyway compiler will clear all the non-initialized fields.


Thanks for clarifying Ilya, that makes more sense.

Thanks all for the work on this. I've now pushed to master.

Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v3 2/4] doc: Add info on vhost tx retries.

2019-06-27 Thread Ian Stokes

On 6/27/2019 1:02 PM, 0-day Robot wrote:

Bleep bloop.  Greetings Kevin Traynor, I am a robot and I have tried out your 
patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Line is 81 characters long (recommended limit is 79)
#49 FILE: Documentation/topics/dpdk/vhost-user.rst:103:
   

Lines checked: 65, Warnings: 1, Errors: 0


I think it's safe to ignore this in this case as otherwise formatting 
would be off in the docs.


Ian



Please check this out.  If you feel there has been an error, please email 
acon...@bytheb.org

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v4] netdev-dpdk: Reset queue number for vhost devices on vm shutdown.

2019-06-27 Thread Ian Stokes

On 6/27/2019 10:43 AM, David Marchand wrote:

Rather than poll all disabled queues and waste some memory for vms that
have been shutdown, we can reconfigure when receiving a destroy
connection notification from the vhost library.

$ while true; do
   ovs-appctl dpif-netdev/pmd-rxq-show |awk '
   /port: / {
 tot++;
 if ($5 == "(enabled)") {
   en++;
 }
   }
   END {
 print "total: " tot ", enabled: " en
   }'
   sleep 1
done

total: 66, enabled: 66
total: 6, enabled: 2

This change requires a fix in the DPDK vhost library, so bump the minimal
required version to 18.11.2.


So in testing this I was seeing an error with the following

2019-06-27T10:00:08Z|00057|dpdk|INFO|VHOST_CONFIG: vhost peer closed
2019-06-27T10:00:08Z|00058|dpdk|ERR|VHOST_CONFIG: (0) device not found.
2019-06-27T10:00:08Z|00059|netdev_dpdk|INFO|vHost Device '' not found

It wasn't until I realized I was testing with DPDK 18.11.2.rc1 that it 
dawned on me the required fix wasn't there...doh!


So in short I can confirm the requirement for 18.11.2 :).

Is there any requirement on the QEMU version side for this patch also? 
Or has the functionality been in place on that side for quite some time 
but was just mishandled in DPDK?


One other minor query below but overall looks ok and has validated 
without issue.




Co-authored-by: Ilya Maximets 
Signed-off-by: Ilya Maximets 
Signed-off-by: David Marchand 
---
Changes since v3:
- rebased on master following 18.11.2 support
- added a note in NEWS about minimal dpdk version

Changes since v2:
- added authorship tags for Ilya
- added logs in destroy_connection

---
  NEWS  |  4 +++-
  lib/netdev-dpdk.c | 47 ++-
  2 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index c03e287..2f8171f 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,9 @@ Post-v2.11.0
   * New option 'other_config:dpdk-socket-limit' to limit amount of
 hugepage memory that can be used by DPDK.
   * Add support for vHost Post-copy Live Migration (experimental).
- * OVS validated with DPDK 18.11.2 which is recommended to be used.
+ * OVS validated with DPDK 18.11.2 which is the new minimal supported
+   version.
+ * DPDK 18.11.1 and lower is no longer supported.
 - OpenFlow:
   * All features required by OpenFlow 1.5 are now implemented, so
 ovs-vswitchd now enables OpenFlow 1.5 by default (in addition to
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index b7f4543..0b9bea4 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -185,12 +185,15 @@ static const struct rte_eth_conf port_conf = {
  static int new_device(int vid);
  static void destroy_device(int vid);
  static int vring_state_changed(int vid, uint16_t queue_id, int enable);
+static void destroy_connection(int vid);
  static const struct vhost_device_ops virtio_net_device_ops =
  {
  .new_device =  new_device,
  .destroy_device = destroy_device,
  .vring_state_changed = vring_state_changed,
-.features_changed = NULL
+.features_changed = NULL,
+.new_connection = NULL,


I take it .new_connection is a requirement? It's just that it's added as 
NULL, but I assume it goes hand in hand with the introduction of 
.destroy connection?


Ian

+.destroy_connection = destroy_connection,
  };
  
  enum { DPDK_RING_SIZE = 256 };

@@ -3663,6 +3666,48 @@ vring_state_changed(int vid, uint16_t queue_id, int 
enable)
  return 0;
  }
  
+static void

+destroy_connection(int vid)
+{
+struct netdev_dpdk *dev;
+char ifname[IF_NAME_SZ];
+bool exists = false;
+
+rte_vhost_get_ifname(vid, ifname, sizeof ifname);
+
+ovs_mutex_lock(_mutex);
+LIST_FOR_EACH (dev, list_node, _list) {
+ovs_mutex_lock(>mutex);
+if (nullable_string_is_equal(ifname, dev->vhost_id)) {
+uint32_t qp_num = NR_QUEUE;
+
+if (netdev_dpdk_get_vid(dev) >= 0) {
+VLOG_ERR("Connection on socket '%s' destroyed while vhost "
+ "device still attached.", dev->vhost_id);
+}
+
+/* Restore the number of queue pairs to default. */
+if (dev->requested_n_txq != qp_num
+|| dev->requested_n_rxq != qp_num) {
+dev->requested_n_rxq = qp_num;
+dev->requested_n_txq = qp_num;
+netdev_request_reconfigure(>up);
+}
+ovs_mutex_unlock(>mutex);
+exists = true;
+break;
+}
+ovs_mutex_unlock(>mutex);
+}
+ovs_mutex_unlock(_mutex);
+
+if (exists) {
+VLOG_INFO("vHost Device '%s' connection has been destroyed", ifname);
+} else {
+VLOG_INFO("vHost Device '%s' not found", ifname);
+}
+}
+
  /*
   * Retrieve the DPDK virtio device ID (vid) associated with a vhostuser
   * or vhostuserclient netdev.



___
dev mailing list
d...@openvswitch.org

Re: [ovs-dev] [PATCH v2 3/3] netdev-dpdk: reset queue number for vhost devices on vm shutdown

2019-06-27 Thread Ian Stokes

On 6/27/2019 8:26 AM, David Marchand wrote:

Hello Ian,

On Wed, Jun 26, 2019 at 11:10 PM Ian Stokes <mailto:ian.sto...@intel.com>> wrote:


On 4/18/2019 3:44 PM, Ilya Maximets wrote:
 > On 18.04.2019 17:05, David Marchand wrote:
 >> Ok, how should I proceed ?
 >> Can I still submit the 3 patches together, to finish handling
the last comments ?
 >
 > Yes, I think so.
 > You may just add a comment under the cut line that this patch
should be applied
 > only after upgrade to DPDK 18.11.2. You may also move the 'Note'
from the commit
 > message there, it'll not be needed in commit message after all.
 >
 > Ian, is it OK for you?

Hi guys, I've applied patches 1 and 2 of the series as there's no
requirement for 18.11.2 there.

I've also sent a v2 of 18.11.2 patch, just waiting for review before
pushing.

https://mail.openvswitch.org/pipermail/ovs-dev/2019-June/360143.html

Once that's in I think David you can re-spin this patch and we can
apply
then.


Thanks, I am preparing a respin for this last patch on top of yours.



Great, I've just pushed support for 18.11.2 to master & branch-2.11, so 
you can rebase and re-send when suits.


Thanks
Ian


--
David Marchand


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 branch-2.11] dpdk: Use DPDK 18.11.2 release.

2019-06-27 Thread Ian Stokes

On 6/27/2019 9:21 AM, Kevin Traynor wrote:

On 26/06/2019 22:06, Ian Stokes wrote:

Modify travis linux build script to use the latest DPDK stable release
18.11.2. Update docs for latest DPDK stable releases.

Signed-off-by: Ian Stokes 
---


Acked-by: Kevin Traynor 



Thanks for the review Kevin, pushed to branch-2.11.

Regards
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2] dpdk: Use DPDK 18.11.2 release.

2019-06-27 Thread Ian Stokes

On 6/27/2019 9:17 AM, Kevin Traynor wrote:

On 26/06/2019 22:06, Ian Stokes wrote:

Modify travis linux build script to use the latest DPDK stable release
18.11.2. Update docs for latest DPDK stable releases.

Signed-off-by: Ian Stokes 
---


Acked-by: Kevin Traynor 



Thasnk all for the reviews, I've pushed to master.

There is also a separate patch for branch-2.11 (it required minor 
rebasing WRT NEWS etc). Are people OK to rewiew that also are are you 
happy to add your tags and apply to 2.11?


https://mail.openvswitch.org/pipermail/ovs-dev/2019-June/360144.html

Regards
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 3/3] netdev-dpdk: reset queue number for vhost devices on vm shutdown

2019-06-26 Thread Ian Stokes

On 4/18/2019 3:44 PM, Ilya Maximets wrote:

On 18.04.2019 17:05, David Marchand wrote:

On Thu, Apr 18, 2019 at 1:51 PM Ilya Maximets mailto:i.maxim...@samsung.com>> wrote:



 On 18.04.2019 14:26, David Marchand wrote:
 > On Wed, Apr 17, 2019 at 4:27 PM Kevin Traynor mailto:ktray...@redhat.com> >> wrote:
 >
 >     On 16/04/2019 10:45, David Marchand wrote:
 >
 >     > Note: this patch requires a fix for the vhost library submitted 
here:
 >     > http://patchwork.dpdk.org/patch/52680/
 >     >
 >     > Without it, this change will do nothing but have openvswitch 
complain
 >     > that the vhost device is unknown:
 >     >
 >     > dpdk|INFO|VHOST_CONFIG: vhost peer closed
 >     > dpdk|ERR|VHOST_CONFIG: (0) device not found.
 >     >
 >     > dpdk|INFO|VHOST_CONFIG: vhost peer closed
 >     > dpdk|ERR|VHOST_CONFIG: (1) device not found.
 >     >
 >     > Signed-off-by: David Marchand mailto:david.march...@redhat.com> >>
 >
 >     I think this probably shouldn't be merged until OVS is using a 
version
 >     of DPDK with the linked patch because it is introducing errors in the
 >     logs which can be alarming for a user. The DPDK fix should be part of
 >     DPDK 18.11.2.
 >
 >
 > It sounds sane yes.
 > Now, 18.11.2 is not ready yet (no pressure Kevin ;-)) as we just got 
18.11.1.
 >
 > Ilya, if we go that way, what do you think of considering the first 
patch for merge now and the others two fixes for when 18.11.2 is ready ?

 I think, we can go with first two patches now and merge the last one when
 the 18.11.2 ready. Second patch should not make any harm as all modern
 drivers has F_MQ support and we'll not waste much time on polling disabled
 queues. Anyway, polling of disabled queues better than guest-controllable

 reconfigurations. We also need to think about backporting the second patch.


Ok, how should I proceed ?
Can I still submit the 3 patches together, to finish handling the last comments 
?


Yes, I think so.
You may just add a comment under the cut line that this patch should be applied
only after upgrade to DPDK 18.11.2. You may also move the 'Note' from the commit
message there, it'll not be needed in commit message after all.

Ian, is it OK for you?


Hi guys, I've applied patches 1 and 2 of the series as there's no 
requirement for 18.11.2 there.


I've also sent a v2 of 18.11.2 patch, just waiting for review before 
pushing.


https://mail.openvswitch.org/pipermail/ovs-dev/2019-June/360143.html

Once that's in I think David you can re-spin this patch and we can apply 
then.


Regards
Ian



--
David Marchand


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2 branch-2.11] dpdk: Use DPDK 18.11.2 release.

2019-06-26 Thread Ian Stokes
Modify travis linux build script to use the latest DPDK stable release
18.11.2. Update docs for latest DPDK stable releases.

Signed-off-by: Ian Stokes 
---
V1 -> V2
* Remove DPDK 18.11.2 minimum requirement notice from NEWS and commit
  message.
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 2 +-
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 NEWS | 2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index e7946bfd9..de8e76f19 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -88,7 +88,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="18.11.1"
+DPDK_VER="18.11.2"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index 09da73a46..eeb949d4a 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -176,7 +176,7 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.8.x17.05.2
 2.9.x17.11.4
 2.10.x   17.11.4
-2.11.x   18.11.1
+2.11.x   18.11.2
  ===
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 149548bc1..6e5f1ea60 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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.1
+- DPDK 18.11.2
 
 - A `DPDK supported NIC`_
 
@@ -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.1.tar.xz
-   $ tar xf dpdk-18.11.1.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.1
+   $ wget http://fast.dpdk.org/rel/dpdk-18.11.2.tar.xz
+   $ tar xf dpdk-18.11.2.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.2
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index 0982e0393..33361ec35 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -320,9 +320,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.1.tar.xz
-$ tar xf dpdk-18.11.1.tar.xz
-$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.1
+$ wget http://fast.dpdk.org/rel/dpdk-18.11.2.tar.xz
+$ tar xf dpdk-18.11.2.tar.xz
+$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.2
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/NEWS b/NEWS
index 859960772..ff2647739 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
 v2.11.2 - xx xxx 
 
- DPDK
- * OVS validated with DPDK 18.11.1 which is recommended to be used.
+ * OVS validated with DPDK 18.11.2 which is recommended to be used.
 
 v2.11.1 - 30 Mar 2019
 
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2] dpdk: Use DPDK 18.11.2 release.

2019-06-26 Thread Ian Stokes
Modify travis linux build script to use the latest DPDK stable release
18.11.2. Update docs for latest DPDK stable releases.

Signed-off-by: Ian Stokes 
---
V1 -> V2
* Remove DPDK minimum requirement 18.11.2 notice in NEWS.
* Remove DPDK minimum requirement 18.11.2 from commit message.
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 2 +-
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 NEWS | 2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 9d84411c5..17428fa6b 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -105,7 +105,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="18.11.1"
+DPDK_VER="18.11.2"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index d9504d682..723d95f2f 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -177,7 +177,7 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.8.x17.05.2
 2.9.x17.11.4
 2.10.x   17.11.4
-2.11.x   18.11.1
+2.11.x   18.11.2
  ===
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 149548bc1..6e5f1ea60 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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.1
+- DPDK 18.11.2
 
 - A `DPDK supported NIC`_
 
@@ -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.1.tar.xz
-   $ tar xf dpdk-18.11.1.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.1
+   $ wget http://fast.dpdk.org/rel/dpdk-18.11.2.tar.xz
+   $ tar xf dpdk-18.11.2.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.2
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index f7b4b338e..ac5f46c43 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -367,9 +367,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.1.tar.xz
-$ tar xf dpdk-18.11.1.tar.xz
-$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.1
+$ wget http://fast.dpdk.org/rel/dpdk-18.11.2.tar.xz
+$ tar xf dpdk-18.11.2.tar.xz
+$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.2
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/NEWS b/NEWS
index af1659ce8..c03e28775 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,7 @@ Post-v2.11.0
  * New option 'other_config:dpdk-socket-limit' to limit amount of
hugepage memory that can be used by DPDK.
  * Add support for vHost Post-copy Live Migration (experimental).
- * OVS validated with DPDK 18.11.1 which is recommended to be used.
+ * OVS validated with DPDK 18.11.2 which is recommended to be used.
- OpenFlow:
  * All features required by OpenFlow 1.5 are now implemented, so
ovs-vswitchd now enables OpenFlow 1.5 by default (in addition to
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v3 2/3] netdev-dpdk: Avoid reconfiguration on VIRTIO_NET_F_MQ changes.

2019-06-26 Thread Ian Stokes

On 4/25/2019 4:22 PM, David Marchand wrote:

At the moment, a malicious guest might negotiate VIRTIO_NET_F_MQ and
!VIRTIO_NET_F_MQ in a loop which would be seen as qp_num going from 1 to
n and n to 1 continuously, triggering datapath reconfigurations at each
transition.

Limit this by only reconfiguring on increased qp_num.
The previous patch reduced the observed cost of polling disabled queues,
so the only cost is memory.

Co-authored-by: Ilya Maximets 
Signed-off-by: Ilya Maximets 
Signed-off-by: David Marchand 
Acked-by: Kevin Traynor 


Seems fair enough. Pushed to master.

Thanks
Ian

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v3 1/3] dpif-netdev: Only poll enabled vhost queues.

2019-06-26 Thread Ian Stokes

On 4/25/2019 4:22 PM, David Marchand wrote:

We currently poll all available queues based on the max queue count
exchanged with the vhost peer and rely on the vhost library in DPDK to
check the vring status beneath.
This can lead to some overhead when we have a lot of unused queues.

To enhance the situation, we can skip the disabled queues.
On rxq notifications, we make use of the netdev's change_seq number so
that the pmd thread main loop can cache the queue state periodically.

$ ovs-appctl dpif-netdev/pmd-rxq-show
pmd thread numa_id 0 core_id 1:
   isolated : true
   port: dpdk0 queue-id:  0 (enabled)   pmd usage:  0 %
pmd thread numa_id 0 core_id 2:
   isolated : true
   port: vhost1queue-id:  0 (enabled)   pmd usage:  0 %
   port: vhost3queue-id:  0 (enabled)   pmd usage:  0 %
pmd thread numa_id 0 core_id 15:
   isolated : true
   port: dpdk1 queue-id:  0 (enabled)   pmd usage:  0 %
pmd thread numa_id 0 core_id 16:
   isolated : true
   port: vhost0queue-id:  0 (enabled)   pmd usage:  0 %
   port: vhost2queue-id:  0 (enabled)   pmd usage:  0 %

$ while true; do
   ovs-appctl dpif-netdev/pmd-rxq-show |awk '
   /port: / {
 tot++;
 if ($5 == "(enabled)") {
   en++;
 }
   }
   END {
 print "total: " tot ", enabled: " en
   }'
   sleep 1
done

total: 6, enabled: 2
total: 6, enabled: 2
...

  # Started vm, virtio devices are bound to kernel driver which enables
  # F_MQ + all queue pairs
total: 6, enabled: 2
total: 66, enabled: 66
...

  # Unbound vhost0 and vhost1 from the kernel driver
total: 66, enabled: 66
total: 66, enabled: 34
...

  # Configured kernel bound devices to use only 1 queue pair
total: 66, enabled: 34
total: 66, enabled: 19
total: 66, enabled: 4
...

  # While rebooting the vm
total: 66, enabled: 4
total: 66, enabled: 2
...
total: 66, enabled: 66
...

  # After shutting down the vm
total: 66, enabled: 66
total: 66, enabled: 2

Signed-off-by: David Marchand 


Thank all for working on this. I didn't come across any issues during 
testing the last 2 days and code LGTM.


I've fixed the alignment issue spotted by Ilya below and pushed to master.

> + ds_put_format(reply, " %s", netdev_rxq_enabled(list[i].rxq->rx)
> +   ? "(enabled) " : "(disabled)");

The second line should be shifted to keep the ternary operator visually 
consistent:


ds_put_format(reply, " %s", netdev_rxq_enabled(list[i].rxq->rx)
? "(enabled) " : "(disabled)");


Regards
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 5/5] dpif-netdev: Catch reloads faster.

2019-06-24 Thread Ian Stokes

On 5/23/2019 3:23 PM, David Marchand wrote:

Looking at the reload flag only every 1024 loops can be a long time
under load, since we might be handling 32 packets per polled rxq, per
iteration, which means up to poll_cnt * 32 * 1024 packets.
Look at the flag every loop, no major performance impact seen.

Signed-off-by: David Marchand 
Acked-by: Eelco Chaudron 


Looks/tested ok for me. Acked.

I've tested various setups in the series (adding/removining varios PMD 
configurations, isolating and distributing queueus, queue re-balancing). 
I also ran a number of scaling performance tests and did not see any 
impact on the performance side.


As I said in the previous patches, I'll wait until Ilya has time to test 
also as it's important that we don't see any regressions with this part 
of the codebase for the various usecases.


Thanks
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 4/5] dpif-netdev: Only reload static tx qid when needed.

2019-06-24 Thread Ian Stokes

On 5/23/2019 3:23 PM, David Marchand wrote:

pmd->static_tx_qid is allocated under a mutex by the different pmd
threads.
Unconditionally reallocating it will make those pmd threads sleep
when contention occurs.
During "normal" reloads like for rebalancing queues between pmd threads,
this can make pmd threads waste time on this.
Reallocating the tx qid is only needed when removing other pmd threads
as it is the only situation when the qid pool can become uncontiguous.

Add a flag to instruct the pmd to reload tx qid for this case which is
Step 1 in current code.



Looks/tested ok for me. Acked.

Ian


Signed-off-by: David Marchand 
Acked-by: Eelco Chaudron 
---
  lib/dpif-netdev.c | 13 +++--
  1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 243c1ce..b763ceb 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -684,6 +684,7 @@ struct dp_netdev_pmd_thread {
  uint64_t last_reload_seq;
  atomic_bool reload; /* Do we need to reload ports? */
  atomic_bool wait_for_reload;/* Can we busy wait for the next reload? 
*/
+atomic_bool reload_tx_qid;  /* Do we need to reload static_tx_qid? */
  atomic_bool exit;   /* For terminating the pmd thread. */
  pthread_t thread;
  unsigned core_id;   /* CPU core id of this pmd thread. */
@@ -4720,6 +4721,7 @@ reconfigure_pmd_threads(struct dp_netdev *dp)
  pmd->core_id)) {
  hmapx_add(_delete, pmd);
  } else if (need_to_adjust_static_tx_qids) {
+atomic_store_relaxed(>reload_tx_qid, true);
  pmd->need_reload = true;
  }
  }
@@ -5442,6 +5444,7 @@ pmd_thread_main(void *f_)
  unsigned int lc = 0;
  struct polled_queue *poll_list;
  bool wait_for_reload = false;
+bool reload_tx_qid;
  bool exiting;
  bool reload;
  int poll_cnt;
@@ -5456,9 +5459,9 @@ pmd_thread_main(void *f_)
  dpdk_set_lcore_id(pmd->core_id);
  poll_cnt = pmd_load_queues_and_ports(pmd, _list);
  dfc_cache_init(>flow_cache);
-reload:
  pmd_alloc_static_tx_qid(pmd);
  
+reload:

  atomic_count_init(>pmd_overloaded, 0);
  
  /* List port/core affinity */

@@ -5539,17 +5542,22 @@ reload:
  
  poll_cnt = pmd_load_queues_and_ports(pmd, _list);

  atomic_read_relaxed(>wait_for_reload, _for_reload);
+atomic_read_relaxed(>reload_tx_qid, _tx_qid);
  atomic_read_relaxed(>exit, );
  /* Signal here to make sure the pmd finishes
   * reloading the updated configuration. */
  dp_netdev_pmd_reload_done(pmd);
  
-pmd_free_static_tx_qid(pmd);

+if (reload_tx_qid) {
+pmd_free_static_tx_qid(pmd);
+pmd_alloc_static_tx_qid(pmd);
+}
  
  if (!exiting) {

  goto reload;
  }
  
+pmd_free_static_tx_qid(pmd);

  dfc_cache_uninit(>flow_cache);
  free(poll_list);
  pmd_free_cached_ports(pmd);
@@ -5876,6 +5884,7 @@ dp_netdev_pmd_reload_done(struct dp_netdev_pmd_thread 
*pmd)
  uint32_t old;
  
  atomic_store_relaxed(>wait_for_reload, false);

+atomic_store_relaxed(>reload_tx_qid, false);
  atomic_store_relaxed(>reload, false);
  pmd->last_reload_seq = seq_read(pmd->reload_seq);
  atomic_sub_explicit(>dp->reloading_pmds, 1, ,



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 3/5] dpif-netdev: Do not sleep when swapping queues.

2019-06-21 Thread Ian Stokes

On 6/20/2019 3:31 PM, David Marchand wrote:




On Wed, Jun 19, 2019 at 3:40 PM Ian Stokes <mailto:ian.sto...@intel.com>> wrote:


On 5/23/2019 3:23 PM, David Marchand wrote:
 > When swapping queues from a pmd thread to another (q0 polled by
pmd0/q1
 > polled by pmd1 -> q1 polled by pmd0/q0 polled by pmd1), the current
 > "Step 5" puts both pmds to sleep waiting for the control thread
to wake
 > them up later.
 >
 > Prefer to make them spin in such a case to avoid sleeping an
 > undeterministic amount of time.
 >
 > Signed-off-by: David Marchand mailto:david.march...@redhat.com>>
 > Acked-by: Eelco Chaudron mailto:echau...@redhat.com>>
 > ---
 >   lib/dpif-netdev.c | 47
++-
 >   1 file changed, 42 insertions(+), 5 deletions(-)
 >
 > diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
 > index 23cf6a6..243c1ce 100644
 > --- a/lib/dpif-netdev.c
 > +++ b/lib/dpif-netdev.c
 > @@ -683,6 +683,7 @@ struct dp_netdev_pmd_thread {
 >       struct seq *reload_seq;
 >       uint64_t last_reload_seq;
 >       atomic_bool reload;             /* Do we need to reload
ports? */
 > +    atomic_bool wait_for_reload;    /* Can we busy wait for the
next reload? */
 >       atomic_bool exit;               /* For terminating the pmd
thread. */
 >       pthread_t thread;
 >       unsigned core_id;               /* CPU core id of this pmd
thread. */
 > @@ -4896,6 +4897,33 @@ reconfigure_datapath(struct dp_netdev *dp)
 >           HMAP_FOR_EACH_SAFE (poll, poll_next, node,
>poll_list) {
 >               if (poll->rxq->pmd != pmd) {
 >                   dp_netdev_del_rxq_from_pmd(pmd, poll);

I'm a little confused by the block below.

 > +
 > +                /* This pmd might sleep after this step reload
if it has no
 > +                 * rxq remaining. Can we tell it to busy wait
for new rxq at
 > +                 * Step 6 ? */

So whats the typical cases we target here, I would think this would
occur if PMDs have been isolated and there are no non isolated queues
available for the rxq to be assigned to?


It can happen in any situation when the rebalance code decides to 
reassign rxqs in a way that, for a given pmd, the old polling list 
intersection with the new polling list is null.
Because of this null intersection, between step 5 and step 6 reload 
notifications, the pmd sleeps until it is woken on the poll_block().




Ah, ok, now that makes a little more sense. From what i've seen, the 
rest of the series look ok, I just want to run a few more tests with 
this scenario in mind.





 > +                if (hmap_count(>poll_list) == 0) {
 > +                    HMAP_FOR_EACH (port, node, >ports) {
 > +                        int qid;
 > +
 > +                        if (!netdev_is_pmd(port->netdev)) {
 > +                            continue;
 > +                        }
 > +
 > +                        for (qid = 0; qid < port->n_rxq; qid++) {
 > +                            struct dp_netdev_rxq *q =
>rxqs[qid];
 > +
 > +                            if (q->pmd == pmd) {
 > +   
atomic_store_relaxed(>pmd->wait_for_reload,

 > +                                                     true);

I was a little confused here, are we marking wait_for_reload true here
so that reload in step 6 will handle any new assignment? Does this not
put it in the busy-wait state already here in step 5? It's just from
reading the comment it looked like busy wait status was expected in
step
6 rather than here.


Nop, we are in step 5, so yes, the comment should say "until" instead of 
"at" ?


Perfect.

Thanks
Ian



--
David Marchand


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v1 1/1] dpdk: Use DPDK 18.11.2 release.

2019-06-20 Thread Ian Stokes
Modify travis linux build script to use the latest DPDK stable release
18.11.2. Update docs for latest DPDK stable releases.

Note: due to commit [1] in DPDK 18.11.2, the behaviour of the vhost
destroy callback has changed. DPDK 18.11.2 is now the default DPDK
release currently supported. DPDK 18.11.1 and below are no longer
supported.

[1] 2b4e951cc341 ("vhost: fix passing destroyed device to destroy
callback")

Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 2 +-
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 NEWS | 4 +++-
 5 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 9d84411c5..17428fa6b 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -105,7 +105,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="18.11.1"
+DPDK_VER="18.11.2"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index d9504d682..723d95f2f 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -177,7 +177,7 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.8.x17.05.2
 2.9.x17.11.4
 2.10.x   17.11.4
-2.11.x   18.11.1
+2.11.x   18.11.2
  ===
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 149548bc1..6e5f1ea60 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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.1
+- DPDK 18.11.2
 
 - A `DPDK supported NIC`_
 
@@ -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.1.tar.xz
-   $ tar xf dpdk-18.11.1.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.1
+   $ wget http://fast.dpdk.org/rel/dpdk-18.11.2.tar.xz
+   $ tar xf dpdk-18.11.2.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.2
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index f7b4b338e..ac5f46c43 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -367,9 +367,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.1.tar.xz
-$ tar xf dpdk-18.11.1.tar.xz
-$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.1
+$ wget http://fast.dpdk.org/rel/dpdk-18.11.2.tar.xz
+$ tar xf dpdk-18.11.2.tar.xz
+$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.2
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/NEWS b/NEWS
index a38ab258f..4c6dc3124 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,9 @@ Post-v2.11.0
  * New option 'other_config:dpdk-socket-limit' to limit amount of
hugepage memory that can be used by DPDK.
  * Add support for vHost Post-copy Live Migration (experimental).
- * OVS validated with DPDK 18.11.1 which is recommended to be used.
+ * DPDK:
+   - DPDK 18.11.2 is the new minimal supported version.
+   - DPDK 18.11.1 and lower is no longer supported.
- OpenFlow:
  * Removed support for OpenFlow 1.6 (draft), which ONF abandoned.
  * New action "check_pkt_larger".
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-2.11 1/1] dpdk: Use DPDK 18.11.2 release.

2019-06-20 Thread Ian Stokes
Modify travis linux build script to use the latest DPDK stable release
18.11.2. Update docs for latest DPDK stable releases.

Note: due to commit [1] in DPDK 18.11.2, the behaviour of the vhost
destroy callback has changed. DPDK 18.11.2 is now the default DPDK
release currently supported. DPDK 18.11.1 and below are no longer
supported.

[1] 2b4e951cc341 ("vhost: fix passing destroyed device to destroy
callback")

Signed-off-by: Ian Stokes 
---
 .travis/linux-build.sh   | 2 +-
 Documentation/faq/releases.rst   | 2 +-
 Documentation/intro/install/dpdk.rst | 8 
 Documentation/topics/dpdk/vhost-user.rst | 6 +++---
 NEWS | 3 ++-
 5 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index e7946bfd9..de8e76f19 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -88,7 +88,7 @@ fi
 
 if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="18.11.1"
+DPDK_VER="18.11.2"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index 09da73a46..eeb949d4a 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -176,7 +176,7 @@ Q: What DPDK version does each Open vSwitch release work 
with?
 2.8.x17.05.2
 2.9.x17.11.4
 2.10.x   17.11.4
-2.11.x   18.11.1
+2.11.x   18.11.2
  ===
 
 Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 149548bc1..6e5f1ea60 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -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.1
+- DPDK 18.11.2
 
 - A `DPDK supported NIC`_
 
@@ -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.1.tar.xz
-   $ tar xf dpdk-18.11.1.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.1
+   $ wget http://fast.dpdk.org/rel/dpdk-18.11.2.tar.xz
+   $ tar xf dpdk-18.11.2.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-stable-18.11.2
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
diff --git a/Documentation/topics/dpdk/vhost-user.rst 
b/Documentation/topics/dpdk/vhost-user.rst
index 0982e0393..33361ec35 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -320,9 +320,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.1.tar.xz
-$ tar xf dpdk-18.11.1.tar.xz
-$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.1
+$ wget http://fast.dpdk.org/rel/dpdk-18.11.2.tar.xz
+$ tar xf dpdk-18.11.2.tar.xz
+$ export DPDK_DIR=/root/dpdk/dpdk-stable-18.11.2
 $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
 $ cd $DPDK_DIR
diff --git a/NEWS b/NEWS
index 859960772..ca13c9a48 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,8 @@
 v2.11.2 - xx xxx 
 
- DPDK
- * OVS validated with DPDK 18.11.1 which is recommended to be used.
+ * DPDK 18.11.2 is the new minimal supported version.
+ * DPDK 18.11.1 and lower is no longer supported.
 
 v2.11.1 - 30 Mar 2019
 
-- 
2.13.6

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 2/5] dpif-netdev: Trigger parallel pmd reloads.

2019-06-19 Thread Ian Stokes

On 5/23/2019 3:23 PM, David Marchand wrote:

pmd reloads are currently serialised in each steps calling
reload_affected_pmds.
Any pmd processing packets, waiting on a mutex etc... will make other
pmd threads wait for a delay that can be undeterministic when syscalls
adds up.

Switch to a little busy loop on the control thread using an atomic
count.

The memory order on this atomic is rel-acq to have an explicit
synchronisation between the pmd threads and the control thread.



Hi David, as in patch 1, LGTM, at least tested without issue tested a 
number scenarios and did not see any breakage. You can add my ACK to this.


Ian


Signed-off-by: David Marchand 
Acked-by: Eelco Chaudron 
---
  lib/dpif-netdev.c | 50 +-
  1 file changed, 37 insertions(+), 13 deletions(-)

---
Changelog since RFC v1:
- added memory ordering on 'reloading_pmds' atomic to serve as a
   synchronisation point between pmd threads and control thread

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 19d7f7d..23cf6a6 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -334,6 +334,9 @@ struct dp_netdev {
  /* The time that a packet can wait in output batch for sending. */
  atomic_uint32_t tx_flush_interval;
  
+/* Count of pmds currently reloading */

+atomic_uint32_t reloading_pmds;
+
  /* Meters. */
  struct ovs_mutex meter_locks[N_METER_LOCKS];
  struct dp_meter *meters[MAX_METERS]; /* Meter bands. */
@@ -646,9 +649,6 @@ struct dp_netdev_pmd_thread {
  struct ovs_refcount ref_cnt;/* Every reference must be refcount'ed. */
  struct cmap_node node;  /* In 'dp->poll_threads'. */
  
-pthread_cond_t cond;/* For synchronizing pmd thread reload. */

-struct ovs_mutex cond_mutex;/* Mutex for condition variable. */
-
  /* Per thread exact-match cache.  Note, the instance for cpu core
   * NON_PMD_CORE_ID can be accessed by multiple threads, and thusly
   * need to be protected by 'non_pmd_mutex'.  Every other instance
@@ -1524,6 +1524,8 @@ create_dp_netdev(const char *name, const struct 
dpif_class *class,
  atomic_init(>emc_insert_min, DEFAULT_EM_FLOW_INSERT_MIN);
  atomic_init(>tx_flush_interval, DEFAULT_TX_FLUSH_INTERVAL);
  
+atomic_init(>reloading_pmds, 0);

+
  cmap_init(>poll_threads);
  dp->pmd_rxq_assign_cyc = true;
  
@@ -1753,11 +1755,8 @@ dp_netdev_reload_pmd__(struct dp_netdev_pmd_thread *pmd)

  return;
  }
  
-ovs_mutex_lock(>cond_mutex);

  seq_change(pmd->reload_seq);
  atomic_store_explicit(>reload, true, memory_order_release);
-ovs_mutex_cond_wait(>cond, >cond_mutex);
-ovs_mutex_unlock(>cond_mutex);
  }
  
  static uint32_t

@@ -4640,9 +4639,31 @@ rxq_scheduling(struct dp_netdev *dp, bool pinned) 
OVS_REQUIRES(dp->port_mutex)
  }
  
  static void

+wait_reloading_pmds(struct dp_netdev *dp)
+{
+uint32_t reloading;
+
+do {
+atomic_read_explicit(>reloading_pmds, ,
+ memory_order_acquire);
+} while (reloading != 0);
+}
+
+static void
  reload_affected_pmds(struct dp_netdev *dp)
  {
  struct dp_netdev_pmd_thread *pmd;
+unsigned int pmd_count = 0;
+
+CMAP_FOR_EACH (pmd, node, >poll_threads) {
+if (pmd->core_id == NON_PMD_CORE_ID) {
+continue;
+}
+if (pmd->need_reload) {
+pmd_count++;
+}
+}
+atomic_store_relaxed(>reloading_pmds, pmd_count);
  
  CMAP_FOR_EACH (pmd, node, >poll_threads) {

  if (pmd->need_reload) {
@@ -4651,6 +4672,10 @@ reload_affected_pmds(struct dp_netdev *dp)
  pmd->need_reload = false;
  }
  }
+
+if (pmd_count != 0) {
+wait_reloading_pmds(dp);
+}
  }
  
  static void

@@ -5812,11 +5837,12 @@ dpif_netdev_enable_upcall(struct dpif *dpif)
  static void
  dp_netdev_pmd_reload_done(struct dp_netdev_pmd_thread *pmd)
  {
-ovs_mutex_lock(>cond_mutex);
+uint32_t old;
+
  atomic_store_relaxed(>reload, false);
  pmd->last_reload_seq = seq_read(pmd->reload_seq);
-xpthread_cond_signal(>cond);
-ovs_mutex_unlock(>cond_mutex);
+atomic_sub_explicit(>dp->reloading_pmds, 1, ,
+memory_order_release);
  }
  
  /* Finds and refs the dp_netdev_pmd_thread on core 'core_id'.  Returns

@@ -5901,8 +5927,6 @@ dp_netdev_configure_pmd(struct dp_netdev_pmd_thread *pmd, 
struct dp_netdev *dp,
  pmd->reload_seq = seq_create();
  pmd->last_reload_seq = seq_read(pmd->reload_seq);
  atomic_init(>reload, false);
-xpthread_cond_init(>cond, NULL);
-ovs_mutex_init(>cond_mutex);
  ovs_mutex_init(>flow_mutex);
  ovs_mutex_init(>port_mutex);
  cmap_init(>flow_table);
@@ -5945,8 +5969,6 @@ dp_netdev_destroy_pmd(struct dp_netdev_pmd_thread *pmd)
  cmap_destroy(>flow_table);
  ovs_mutex_destroy(>flow_mutex);
  seq_destroy(pmd->reload_seq);
-xpthread_cond_destroy(>cond);
-

Re: [ovs-dev] [PATCH 3/5] dpif-netdev: Do not sleep when swapping queues.

2019-06-19 Thread Ian Stokes

On 5/23/2019 3:23 PM, David Marchand wrote:

When swapping queues from a pmd thread to another (q0 polled by pmd0/q1
polled by pmd1 -> q1 polled by pmd0/q0 polled by pmd1), the current
"Step 5" puts both pmds to sleep waiting for the control thread to wake
them up later.

Prefer to make them spin in such a case to avoid sleeping an
undeterministic amount of time.

Signed-off-by: David Marchand 
Acked-by: Eelco Chaudron 
---
  lib/dpif-netdev.c | 47 ++-
  1 file changed, 42 insertions(+), 5 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 23cf6a6..243c1ce 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -683,6 +683,7 @@ struct dp_netdev_pmd_thread {
  struct seq *reload_seq;
  uint64_t last_reload_seq;
  atomic_bool reload; /* Do we need to reload ports? */
+atomic_bool wait_for_reload;/* Can we busy wait for the next reload? */
  atomic_bool exit;   /* For terminating the pmd thread. */
  pthread_t thread;
  unsigned core_id;   /* CPU core id of this pmd thread. */
@@ -4896,6 +4897,33 @@ reconfigure_datapath(struct dp_netdev *dp)
  HMAP_FOR_EACH_SAFE (poll, poll_next, node, >poll_list) {
  if (poll->rxq->pmd != pmd) {
  dp_netdev_del_rxq_from_pmd(pmd, poll);


I'm a little confused by the block below.


+
+/* This pmd might sleep after this step reload if it has no
+ * rxq remaining. Can we tell it to busy wait for new rxq at
+ * Step 6 ? */


So whats the typical cases we target here, I would think this would 
occur if PMDs have been isolated and there are no non isolated queues 
available for the rxq to be assigned to?



+if (hmap_count(>poll_list) == 0) {
+HMAP_FOR_EACH (port, node, >ports) {
+int qid;
+
+if (!netdev_is_pmd(port->netdev)) {
+continue;
+}
+
+for (qid = 0; qid < port->n_rxq; qid++) {
+struct dp_netdev_rxq *q = >rxqs[qid];
+
+if (q->pmd == pmd) {
+atomic_store_relaxed(>pmd->wait_for_reload,
+ true);


I was a little confused here, are we marking wait_for_reload true here 
so that reload in step 6 will handle any new assignment? Does this not 
put it in the busy-wait state already here in step 5? It's just from 
reading the comment it looked like busy wait status was expected in step 
6 rather than here.


Ian

+break;
+}
+}
+
+if (qid != port->n_rxq) {
+break;
+}
+}
+}
  }
  }
  ovs_mutex_unlock(>port_mutex);
@@ -5413,7 +5441,9 @@ pmd_thread_main(void *f_)
  struct pmd_perf_stats *s = >perf_stats;
  unsigned int lc = 0;
  struct polled_queue *poll_list;
+bool wait_for_reload = false;
  bool exiting;
+bool reload;
  int poll_cnt;
  int i;
  int process_packets = 0;
@@ -5441,9 +5471,16 @@ reload:
  }
  
  if (!poll_cnt) {

-while (seq_read(pmd->reload_seq) == pmd->last_reload_seq) {
-seq_wait(pmd->reload_seq, pmd->last_reload_seq);
-poll_block();
+/* Don't sleep, control thread will ask for a reload shortly. */
+if (wait_for_reload) {
+do {
+atomic_read_relaxed(>reload, );
+} while (!reload);
+} else {
+while (seq_read(pmd->reload_seq) == pmd->last_reload_seq) {
+seq_wait(pmd->reload_seq, pmd->last_reload_seq);
+poll_block();
+}
  }
  lc = UINT_MAX;
  }
@@ -5482,8 +5519,6 @@ reload:
  }
  
  if (lc++ > 1024) {

-bool reload;
-
  lc = 0;
  
  coverage_try_clear();

@@ -5503,6 +5538,7 @@ reload:
  ovs_mutex_unlock(>perf_stats.stats_mutex);
  
  poll_cnt = pmd_load_queues_and_ports(pmd, _list);

+atomic_read_relaxed(>wait_for_reload, _for_reload);
  atomic_read_relaxed(>exit, );
  /* Signal here to make sure the pmd finishes
   * reloading the updated configuration. */
@@ -5839,6 +5875,7 @@ dp_netdev_pmd_reload_done(struct dp_netdev_pmd_thread 
*pmd)
  {
  uint32_t old;
  
+atomic_store_relaxed(>wait_for_reload, false);

  atomic_store_relaxed(>reload, false);
  pmd->last_reload_seq = seq_read(pmd->reload_seq);
  atomic_sub_explicit(>dp->reloading_pmds, 1, ,



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 1/5] dpif-netdev: Convert exit latch to flag.

2019-06-19 Thread Ian Stokes

On 5/23/2019 3:23 PM, David Marchand wrote:

No need for a latch here since we don't have to wait.
A simple boolean flag is enough.

The memory order on the reload flag is changed to rel-acq ordering to
serve as a synchronisation point between the pmd threads and the control
thread that asks for termination.

Fixes: e4cfed38b159 ("dpif-netdev: Add poll-mode-device thread.")
Signed-off-by: David Marchand 
Acked-by: Eelco Chaudron 


Hi David, this change looks ok to me, tested a number scenarios and did 
not see any breakage. I'm happy to Ack, but will hold off applying until 
Ilya has a chance to look also as he's quite familiar with this area of 
the code base.


Ian


---
  lib/dpif-netdev.c | 14 ++
  1 file changed, 6 insertions(+), 8 deletions(-)

---
Changelog since RFC v2:
- removed now unused latch.h inclusion

Changelog since RFC v1:
- added memory ordering on 'reload' atomic to serve as a synchronisation
   point between control thread and pmd threads

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 5a6f2ab..19d7f7d 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -48,7 +48,6 @@
  #include "hmapx.h"
  #include "id-pool.h"
  #include "ipf.h"
-#include "latch.h"
  #include "netdev.h"
  #include "netdev-provider.h"
  #include "netdev-vport.h"
@@ -681,10 +680,10 @@ struct dp_netdev_pmd_thread {
  /* Current context of the PMD thread. */
  struct dp_netdev_pmd_thread_ctx ctx;
  
-struct latch exit_latch;/* For terminating the pmd thread. */

  struct seq *reload_seq;
  uint64_t last_reload_seq;
  atomic_bool reload; /* Do we need to reload ports? */
+atomic_bool exit;   /* For terminating the pmd thread. */
  pthread_t thread;
  unsigned core_id;   /* CPU core id of this pmd thread. */
  int numa_id;/* numa node id of this pmd thread. */
@@ -1756,7 +1755,7 @@ dp_netdev_reload_pmd__(struct dp_netdev_pmd_thread *pmd)
  
  ovs_mutex_lock(>cond_mutex);

  seq_change(pmd->reload_seq);
-atomic_store_relaxed(>reload, true);
+atomic_store_explicit(>reload, true, memory_order_release);
  ovs_mutex_cond_wait(>cond, >cond_mutex);
  ovs_mutex_unlock(>cond_mutex);
  }
@@ -5468,7 +5467,7 @@ reload:
  emc_cache_slow_sweep(&((pmd->flow_cache).emc_cache));
  }
  
-atomic_read_relaxed(>reload, );

+atomic_read_explicit(>reload, , memory_order_acquire);
  if (reload) {
  break;
  }
@@ -5479,7 +5478,7 @@ reload:
  ovs_mutex_unlock(>perf_stats.stats_mutex);
  
  poll_cnt = pmd_load_queues_and_ports(pmd, _list);

-exiting = latch_is_set(>exit_latch);
+atomic_read_relaxed(>exit, );
  /* Signal here to make sure the pmd finishes
   * reloading the updated configuration. */
  dp_netdev_pmd_reload_done(pmd);
@@ -5898,7 +5897,7 @@ dp_netdev_configure_pmd(struct dp_netdev_pmd_thread *pmd, 
struct dp_netdev *dp,
  pmd->n_output_batches = 0;
  
  ovs_refcount_init(>ref_cnt);

-latch_init(>exit_latch);
+atomic_init(>exit, false);
  pmd->reload_seq = seq_create();
  pmd->last_reload_seq = seq_read(pmd->reload_seq);
  atomic_init(>reload, false);
@@ -5945,7 +5944,6 @@ dp_netdev_destroy_pmd(struct dp_netdev_pmd_thread *pmd)
  cmap_destroy(>classifiers);
  cmap_destroy(>flow_table);
  ovs_mutex_destroy(>flow_mutex);
-latch_destroy(>exit_latch);
  seq_destroy(pmd->reload_seq);
  xpthread_cond_destroy(>cond);
  ovs_mutex_destroy(>cond_mutex);
@@ -5967,7 +5965,7 @@ dp_netdev_del_pmd(struct dp_netdev *dp, struct 
dp_netdev_pmd_thread *pmd)
  pmd_free_static_tx_qid(pmd);
  ovs_mutex_unlock(>non_pmd_mutex);
  } else {
-latch_set(>exit_latch);
+atomic_store_relaxed(>exit, true);
  dp_netdev_reload_pmd__(pmd);
  xpthread_join(pmd->thread, NULL);
  }



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] Docs: Refer to 18.11.1 dpdk version.

2019-06-12 Thread Ian Stokes

On 6/12/2019 2:01 PM, David Marchand wrote:



On Wed, Jun 12, 2019 at 2:55 PM Ian Stokes <mailto:ian.sto...@intel.com>> wrote:


On 6/12/2019 12:49 PM, David Marchand wrote:
 > This section is about checking dpdk, we can focus on just its
version.
 > Then update the version to 18.11.1 in the commands output.
 >
 > Fixes: 03f3f9c0faf8 ("dpdk: Update to use DPDK 18.11.")
 > Fixes: b5355b0d6e66 ("dpdk: Use DPDK 18.11.1 release.")
 >
 > Signed-off-by: David Marchand mailto:david.march...@redhat.com>>
 > ---
 >   Documentation/intro/install/dpdk.rst | 7 +++
 >   1 file changed, 3 insertions(+), 4 deletions(-)
 >
 > diff --git a/Documentation/intro/install/dpdk.rst
b/Documentation/intro/install/dpdk.rst
 > index 149548b..e4a95ba 100644
 > --- a/Documentation/intro/install/dpdk.rst
 > +++ b/Documentation/intro/install/dpdk.rst
 > @@ -281,11 +281,10 @@ initialization succeeded::
 >   Additionally, the library version linked to ovs-vswitchd can be
confirmed
 >   with either the ovs-vswitchd logs, or by running either of the
commands::
 >
 > -  $ ovs-vswitchd --version
 > -  ovs-vswitchd (Open vSwitch) 2.9.0
 > -  DPDK 17.11.0
 > +  $ ovs-vswitchd --version |grep -i dpdk
 > +  DPDK 18.11.1
 >     $ ovs-vsctl get Open_vSwitch . dpdk_version
 > -  "DPDK 17.11.0"
 > +  "DPDK 18.11.1"

Hi David,

thanks for this. I had submitted a similar change originally in the v2
for supporting 18.11 as you have above, but the feedback was to drop
the
change as we could run into a case where on the master branch we
support
a DPDK version that is different to what the latest OVS release supports

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


I had the impression I had already read something but could not find the 
mail...

Thanks.


As this is just an example command, the consensus seemed to be it
was ok
to leave it as is.

The DPDK version wasn't listed before OVS 2.10 release, so an
alternative approach  could be to tag that this was introduced in OVS
2.10 using the version changed tag

.. versionchanged:: 2.10.0

and flag above is an example output, users should check the mapping of
OVS to DPDK using the OVS release faq (that will be kept up to date for
the latest DPDK release anyhow). Thoughts?


In the paragraph before we mention that the user can check ovs-vswitchd 
logs without quoting an actual output.

So we might as well remove the example outputs of those two commands.



Agreed, avoids the issue all together, I'd still like to see the version 
change tag just to flag that the commands listed above only output DPDK 
version from OVS 2.10 onward, otherwise someone using 2.9 or prior may 
not be aware the commands do not output DPDK version for those releases.


Ian


--
David Marchand


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] Docs: Refer to 18.11.1 dpdk version.

2019-06-12 Thread Ian Stokes

On 6/12/2019 12:49 PM, David Marchand wrote:

This section is about checking dpdk, we can focus on just its version.
Then update the version to 18.11.1 in the commands output.

Fixes: 03f3f9c0faf8 ("dpdk: Update to use DPDK 18.11.")
Fixes: b5355b0d6e66 ("dpdk: Use DPDK 18.11.1 release.")

Signed-off-by: David Marchand 
---
  Documentation/intro/install/dpdk.rst | 7 +++
  1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 149548b..e4a95ba 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -281,11 +281,10 @@ initialization succeeded::
  Additionally, the library version linked to ovs-vswitchd can be confirmed
  with either the ovs-vswitchd logs, or by running either of the commands::
  
-  $ ovs-vswitchd --version

-  ovs-vswitchd (Open vSwitch) 2.9.0
-  DPDK 17.11.0
+  $ ovs-vswitchd --version |grep -i dpdk
+  DPDK 18.11.1
$ ovs-vsctl get Open_vSwitch . dpdk_version
-  "DPDK 17.11.0"
+  "DPDK 18.11.1"


Hi David,

thanks for this. I had submitted a similar change originally in the v2 
for supporting 18.11 as you have above, but the feedback was to drop the 
change as we could run into a case where on the master branch we support 
a DPDK version that is different to what the latest OVS release supports


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

As this is just an example command, the consensus seemed to be it was ok 
to leave it as is.


The DPDK version wasn't listed before OVS 2.10 release, so an 
alternative approach  could be to tag that this was introduced in OVS 
2.10 using the version changed tag


.. versionchanged:: 2.10.0

and flag above is an example output, users should check the mapping of 
OVS to DPDK using the OVS release faq (that will be kept up to date for 
the latest DPDK release anyhow). Thoughts?


Regards
Ian


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2] travis: Don't install kernel for DPDK checks.

2019-06-12 Thread Ian Stokes

On 6/11/2019 6:13 PM, David Marchand wrote:



On Tue, Jun 11, 2019 at 5:32 PM Ilya Maximets > wrote:


We don't need to build DPDK kernel modules to test build with OVS.
And we don't need to build OVS datapath modules for checking
userspace with DPDK.

Removed 'max-inline-insns-single' changes that only was needed for
DPDK kernel modules. Config modifications changed to update
generated build/.config instead of changing sources.

Signed-off-by: Ilya Maximets mailto:i.maxim...@samsung.com>>
---

Version 2:

   * Removed -Wno-error=inline.
   * config/common_base --> build/.config

  .travis.yml            |  8 
  .travis/linux-build.sh | 25 +
  2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 6621fb535..7addcb231 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,10 +31,10 @@ env:
    - TESTSUITE=1 KERNEL=3.16
    - TESTSUITE=1 OPTS="--enable-shared"
    - BUILD_ENV="-m32" OPTS="--disable-ssl"
-  - KERNEL=3.16 DPDK=1 OPTS="--enable-shared"
-  - KERNEL=3.16 TESTSUITE=1 DPDK=1
-  - KERNEL=3.16 DPDK_SHARED=1
-  - KERNEL=3.16 DPDK_SHARED=1 OPTS="--enable-shared"
+  - DPDK=1 OPTS="--enable-shared"
+  - TESTSUITE=1 DPDK=1
+  - DPDK_SHARED=1
+  - DPDK_SHARED=1 OPTS="--enable-shared"
    - KERNEL=4.20
    - KERNEL=4.19
    - KERNEL=4.18
diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 123cde575..b88bfb53e 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -3,7 +3,6 @@
  set -o errexit
  set -x

-KERNELSRC=""
  CFLAGS=""
  SPARSE_FLAGS=""
  EXTRA_OPTS="--enable-Werror"
@@ -57,10 +56,7 @@ function install_kernel()
          make net/bridge/
      fi

-    KERNELSRC=$(pwd)
-    if [ ! "$DPDK" ] && [ ! "$DPDK_SHARED" ]; then
-        EXTRA_OPTS="${EXTRA_OPTS} --with-linux=$(pwd)"
-    fi
+    EXTRA_OPTS="${EXTRA_OPTS} --with-linux=$(pwd)"
      echo "Installed kernel source in $(pwd)"
      cd ..
  }
@@ -78,16 +74,21 @@ function install_dpdk()
          if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
          cd dpdk-$1
      fi
-    find ./ -type f | xargs sed -i
's/max-inline-insns-single=100/max-inline-insns-single=400/'
-    find ./ -type f | xargs sed -i 's/-Werror/-Werror
-Wno-error=inline/'
      echo 'CONFIG_RTE_BUILD_FPIC=y' >>config/common_linuxapp
      sed -ri '/EXECENV_CFLAGS  = -pthread -fPIC/{s/$/\nelse ifeq
($(CONFIG_RTE_BUILD_FPIC),y)/;s/$/\nEXECENV_CFLAGS  = -pthread
-fPIC/}' mk/exec-env/linuxapp/rte.vars.mk 
+
+    make config CC=gcc T=$TARGET
+
      if [ "$DPDK_SHARED" ]; then
-        sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/'
config/common_base
+        sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/' build/.config
          export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/$TARGET/lib
      fi
-    make config CC=gcc T=$TARGET
-    make -j4 CC=gcc RTE_KERNELDIR=$KERNELSRC
+
+    # Disable building DPDK kernel modules. Not needed for OVS
build or tests.
+    sed -i '/CONFIG_RTE_EAL_IGB_UIO=y/s/=y/=n/' build/.config
+    sed -i '/CONFIG_RTE_KNI_KMOD=y/s/=y/=n/' build/.config


We could also disable the librte_kni but we are fine with just disabling 
the kmods.



+
+    make -j4 CC=gcc
      echo "Installed DPDK source in $(pwd)"
      cd ..
  }
@@ -97,7 +98,7 @@ function configure_ovs()
      ./boot.sh && ./configure $* || { cat config.log; exit 1; }
  }

-if [ "$KERNEL" ] || [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
+if [ "$KERNEL" ]; then
      install_kernel $KERNEL
  fi

@@ -141,7 +142,7 @@ else
      make selinux-policy

      # Only build datapath if we are testing kernel w/o running
testsuite
-    if [ "$KERNEL" ] && [ ! "$DPDK" ] && [ ! "$DPDK_SHARED" ]; then
+    if [ "$KERNEL" ]; then
          cd datapath
      fi
      make -j4
-- 
2.17.1



Reviewed-by: David Marchand >
Tested-by: David Marchand >



--
David Marchand


Thanks all, LGTM, pushed to master.

Regards
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [dpdk-latest PATCH] netdev-dpdk: Prefix network structures with rte_.

2019-06-11 Thread Ian Stokes

On 6/11/2019 3:40 PM, Aaron Conole wrote:

Ian Stokes  writes:


On 6/10/2019 3:57 PM, Ian Stokes wrote:

On 6/6/2019 12:36 PM, David Marchand wrote:



On Thu, Jun 6, 2019 at 1:25 PM Ian Stokes mailto:ian.sto...@intel.com>> wrote:

     On 6/4/2019 12:14 PM, David Marchand wrote:
  > On Tue, Jun 4, 2019 at 11:29 AM David Marchand
  > mailto:david.march...@redhat.com>
     <mailto:david.march...@redhat.com
     <mailto:david.march...@redhat.com>>> wrote:
  >
  >     Following a rework of dpdk network structures names [1],
     update the
  >     concerned parts.
  >
  >     Ran Olivier script:
  >     sh prefix-net-rte.sh $(find -name "*dpdk*.c")
  >     sh prefix-net-rte.sh $(find -name "*dpdk*.h")
  >     sh prefix-net-rte.sh $(find -name "*rte*.c")
  >     sh prefix-net-rte.sh $(find -name "*rte*.h")
  >
  >     Plus an extra pass following further changes [2]:
  >     old=RTE_IPv4
  >     new=RTE_IPV4
  >     git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
  >
  >     old=RTE_ETHER_TYPE_IPv4
  >     new=RTE_ETHER_TYPE_IPV4
  >     git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
  >
  >     old=RTE_ETHER_TYPE_IPv6
  >     new=RTE_ETHER_TYPE_IPV6
  >     git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
  >
  >     1: http://mails.dpdk.org/archives/dev/2019-May/132612.html
  >     2: https://git.dpdk.org/dpdk/commit/?id=0c9da7555da8
  >
  >
  > Olivier noticed that I had used an early version of his patch.
  > The published one handles the update on RTE_IPv4.
  > I tried the last version which gives the same result anyway.
  > So the extra pass is unnecessary.
  >
  > I can send a v2 to update the commitlog accordingly.
  >

     Hi David,

     thanks for this, upon inspection the patch looks fine and I can
confirm
     that dpdk-latest is now building with Master of DPDK again.

     I'm just in the process of running a few smoke tests to make sure
     there's no issues functionally (I don't expect to see any as the
     changes
     seem straight forward).

     WRT the v2, what exactly do you want to change in the commit? If it's
     trivial I can amend it before committing.



I just stripped the useless part in the commitlog and put a link to
Olivier mail which contained his script.
You can see the commitlog here:
https://github.com/david-marchand/ovs/commit/9d367de7d323c28f7c89d590ff60373c47ffa073




     I'll be applying this to dpdk-latest and dpdk-hwol branches but
not ovs
     master (master is still using DPDK 18.11.1 currently so no need for
     these changes until it moves to 19.11).



Yes, makes sense.
Thanks Ian.


Thanks David, validated and pushed to dpdk-latest and dpdk-wol.


Good catch actually. In the past we had previously tracked the latest
DPDK release to compile against, but now that dpdk-latest is used with
the UNH DPDK CI it probably makes more sense to track DPDK master at
that's what dpdk-latest looks to enable compilation of.

I'm not against this, would be interested in what peoples thoughts are
and if so we can modify travis for the dpdk-latest branch.


At least for this part (per-branch), the travis yml is read on a
per-branch basis.  If it changes on one branch, only that branch will
be affected.  Is this what you mean?


Yes, travis would be changed to track master just for dpdk-latest is my 
understanding. OVS master and OVS release branches should still only 
track the DPDK LTS release they are currently validated against in their 
travis yml.


Ian



Ian


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [dpdk-latest PATCH] netdev-dpdk: Prefix network structures with rte_.

2019-06-11 Thread Ian Stokes

On 6/10/2019 3:57 PM, Ian Stokes wrote:

On 6/6/2019 12:36 PM, David Marchand wrote:



On Thu, Jun 6, 2019 at 1:25 PM Ian Stokes <mailto:ian.sto...@intel.com>> wrote:


    On 6/4/2019 12:14 PM, David Marchand wrote:
 > On Tue, Jun 4, 2019 at 11:29 AM David Marchand
 > mailto:david.march...@redhat.com>
    <mailto:david.march...@redhat.com
    <mailto:david.march...@redhat.com>>> wrote:
 >
 >     Following a rework of dpdk network structures names [1],
    update the
 >     concerned parts.
 >
 >     Ran Olivier script:
 >     sh prefix-net-rte.sh $(find -name "*dpdk*.c")
 >     sh prefix-net-rte.sh $(find -name "*dpdk*.h")
 >     sh prefix-net-rte.sh $(find -name "*rte*.c")
 >     sh prefix-net-rte.sh $(find -name "*rte*.h")
 >
 >     Plus an extra pass following further changes [2]:
 >     old=RTE_IPv4
 >     new=RTE_IPV4
 >     git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
 >
 >     old=RTE_ETHER_TYPE_IPv4
 >     new=RTE_ETHER_TYPE_IPV4
 >     git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
 >
 >     old=RTE_ETHER_TYPE_IPv6
 >     new=RTE_ETHER_TYPE_IPV6
 >     git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
 >
 >     1: http://mails.dpdk.org/archives/dev/2019-May/132612.html
 >     2: https://git.dpdk.org/dpdk/commit/?id=0c9da7555da8
 >
 >
 > Olivier noticed that I had used an early version of his patch.
 > The published one handles the update on RTE_IPv4.
 > I tried the last version which gives the same result anyway.
 > So the extra pass is unnecessary.
 >
 > I can send a v2 to update the commitlog accordingly.
 >

    Hi David,

    thanks for this, upon inspection the patch looks fine and I can 
confirm

    that dpdk-latest is now building with Master of DPDK again.

    I'm just in the process of running a few smoke tests to make sure
    there's no issues functionally (I don't expect to see any as the
    changes
    seem straight forward).

    WRT the v2, what exactly do you want to change in the commit? If it's
    trivial I can amend it before committing.



I just stripped the useless part in the commitlog and put a link to 
Olivier mail which contained his script.

You can see the commitlog here:
https://github.com/david-marchand/ovs/commit/9d367de7d323c28f7c89d590ff60373c47ffa073 





    I'll be applying this to dpdk-latest and dpdk-hwol branches but 
not ovs

    master (master is still using DPDK 18.11.1 currently so no need for
    these changes until it moves to 19.11).



Yes, makes sense.
Thanks Ian.


Thanks David, validated and pushed to dpdk-latest and dpdk-wol.


Good catch actually. In the past we had previously tracked the latest 
DPDK release to compile against, but now that dpdk-latest is used with 
the UNH DPDK CI it probably makes more sense to track DPDK master at 
that's what dpdk-latest looks to enable compilation of.


I'm not against this, would be interested in what peoples thoughts are 
and if so we can modify travis for the dpdk-latest branch.


Ian


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [dpdk-latest PATCH] netdev-dpdk: Prefix network structures with rte_.

2019-06-10 Thread Ian Stokes

On 6/6/2019 12:36 PM, David Marchand wrote:



On Thu, Jun 6, 2019 at 1:25 PM Ian Stokes <mailto:ian.sto...@intel.com>> wrote:


On 6/4/2019 12:14 PM, David Marchand wrote:
 > On Tue, Jun 4, 2019 at 11:29 AM David Marchand
 > mailto:david.march...@redhat.com>
<mailto:david.march...@redhat.com
<mailto:david.march...@redhat.com>>> wrote:
 >
 >     Following a rework of dpdk network structures names [1],
update the
 >     concerned parts.
 >
 >     Ran Olivier script:
 >     sh prefix-net-rte.sh $(find -name "*dpdk*.c")
 >     sh prefix-net-rte.sh $(find -name "*dpdk*.h")
 >     sh prefix-net-rte.sh $(find -name "*rte*.c")
 >     sh prefix-net-rte.sh $(find -name "*rte*.h")
 >
 >     Plus an extra pass following further changes [2]:
 >     old=RTE_IPv4
 >     new=RTE_IPV4
 >     git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
 >
 >     old=RTE_ETHER_TYPE_IPv4
 >     new=RTE_ETHER_TYPE_IPV4
 >     git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
 >
 >     old=RTE_ETHER_TYPE_IPv6
 >     new=RTE_ETHER_TYPE_IPV6
 >     git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
 >
 >     1: http://mails.dpdk.org/archives/dev/2019-May/132612.html
 >     2: https://git.dpdk.org/dpdk/commit/?id=0c9da7555da8
 >
 >
 > Olivier noticed that I had used an early version of his patch.
 > The published one handles the update on RTE_IPv4.
 > I tried the last version which gives the same result anyway.
 > So the extra pass is unnecessary.
 >
 > I can send a v2 to update the commitlog accordingly.
 >

Hi David,

thanks for this, upon inspection the patch looks fine and I can confirm
that dpdk-latest is now building with Master of DPDK again.

I'm just in the process of running a few smoke tests to make sure
there's no issues functionally (I don't expect to see any as the
changes
seem straight forward).

WRT the v2, what exactly do you want to change in the commit? If it's
trivial I can amend it before committing.



I just stripped the useless part in the commitlog and put a link to 
Olivier mail which contained his script.

You can see the commitlog here:
https://github.com/david-marchand/ovs/commit/9d367de7d323c28f7c89d590ff60373c47ffa073



I'll be applying this to dpdk-latest and dpdk-hwol branches but not ovs
master (master is still using DPDK 18.11.1 currently so no need for
these changes until it moves to 19.11).



Yes, makes sense.
Thanks Ian.


Thanks David, validated and pushed to dpdk-latest and dpdk-wol.

Regards
Ian
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [dpdk-latest PATCH] netdev-dpdk: Prefix network structures with rte_.

2019-06-06 Thread Ian Stokes

On 6/4/2019 12:14 PM, David Marchand wrote:
On Tue, Jun 4, 2019 at 11:29 AM David Marchand 
mailto:david.march...@redhat.com>> wrote:


Following a rework of dpdk network structures names [1], update the
concerned parts.

Ran Olivier script:
sh prefix-net-rte.sh $(find -name "*dpdk*.c")
sh prefix-net-rte.sh $(find -name "*dpdk*.h")
sh prefix-net-rte.sh $(find -name "*rte*.c")
sh prefix-net-rte.sh $(find -name "*rte*.h")

Plus an extra pass following further changes [2]:
old=RTE_IPv4
new=RTE_IPV4
git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"

old=RTE_ETHER_TYPE_IPv4
new=RTE_ETHER_TYPE_IPV4
git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"

old=RTE_ETHER_TYPE_IPv6
new=RTE_ETHER_TYPE_IPV6
git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"

1: http://mails.dpdk.org/archives/dev/2019-May/132612.html
2: https://git.dpdk.org/dpdk/commit/?id=0c9da7555da8


Olivier noticed that I had used an early version of his patch.
The published one handles the update on RTE_IPv4.
I tried the last version which gives the same result anyway.
So the extra pass is unnecessary.

I can send a v2 to update the commitlog accordingly.



Hi David,

thanks for this, upon inspection the patch looks fine and I can confirm 
that dpdk-latest is now building with Master of DPDK again.


I'm just in the process of running a few smoke tests to make sure 
there's no issues functionally (I don't expect to see any as the changes 
seem straight forward).


WRT the v2, what exactly do you want to change in the commit? If it's 
trivial I can amend it before committing.


I'll be applying this to dpdk-latest and dpdk-hwol branches but not ovs 
master (master is still using DPDK 18.11.1 currently so no need for 
these changes until it moves to 19.11).


Regards
Ian


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v9 3/5] dpif-netdev: split out generic lookup function

2019-06-05 Thread Ian Stokes

On 5/8/2019 4:13 PM, Harry van Haaren wrote:

This commit splits the generic hash-lookup-verify
function to its own file. In doing so, we must move
some MACRO definitions to dpif-netdev.h

Signed-off-by: Harry van Haaren 

---

v6:
- Fixup some checkpatch warnings on whitespace with MACROs (Ilya)
- Other MACROs function incorrectly when checkpatch is happy,
   so using the functional version without space after the ( character.
   This prints a checkpatch warning, but I see no way to fix it.
---
  lib/automake.mk  |  1 +
  lib/dpif-netdev-lookup-generic.c | 94 
  lib/dpif-netdev.c| 80 +--
  lib/dpif-netdev.h| 16 ++
  4 files changed, 112 insertions(+), 79 deletions(-)
  create mode 100644 lib/dpif-netdev-lookup-generic.c

diff --git a/lib/automake.mk b/lib/automake.mk
index cc5dccf39..4817609b2 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -78,6 +78,7 @@ lib_libopenvswitch_la_SOURCES = \
lib/dp-packet.h \
lib/dp-packet.c \
lib/dpdk.h \
+   lib/dpif-netdev-lookup-generic.c \
lib/dpif-netdev.c \
lib/dpif-netdev.h \
lib/dpif-netdev-perf.c \
diff --git a/lib/dpif-netdev-lookup-generic.c b/lib/dpif-netdev-lookup-generic.c
new file mode 100644
index 0..2e4003408
--- /dev/null
+++ b/lib/dpif-netdev-lookup-generic.c
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017 Nicira, Inc.
+ *


Typically when creating a new file in OVS the name of the company who 
create the file is placed at the beginning so something like 'Copyright 
(c) 2019 Intel Corporation'  below the existing Copyright.



+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include 
+#include "dpif-netdev.h"
+
+#include "bitmap.h"
+#include "cmap.h"
+
+#include "dp-packet.h"
+#include "dpif.h"
+#include "dpif-netdev-perf.h"
+#include "dpif-provider.h"
+#include "flow.h"
+#include "packets.h"
+#include "pvector.h"
+
+/* Returns a hash value for the bits of 'key' where there are 1-bits in
+ * 'mask'. */
+static inline uint32_t
+netdev_flow_key_hash_in_mask(const struct netdev_flow_key *key,
+ const struct netdev_flow_key *mask)
+{
+const uint64_t *p = miniflow_get_values(>mf);
+uint32_t hash = 0;
+uint64_t value;
+
+NETDEV_FLOW_KEY_FOR_EACH_IN_FLOWMAP (value, key, mask->mf.map) {
+hash = hash_add64(hash, value & *p);
+p++;
+}
+
+return hash_finish(hash, (p - miniflow_get_values(>mf)) * 8);
+}
+
+uint32_t
+dpcls_subtable_lookup_generic(struct dpcls_subtable *subtable,
+  uint32_t keys_map,
+  const struct netdev_flow_key *keys[],
+  struct dpcls_rule **rules)
+{
+int i;
+/* Compute hashes for the remaining keys.  Each search-key is
+ * masked with the subtable's mask to avoid hashing the wildcarded
+ * bits. */
+uint32_t hashes[NETDEV_MAX_BURST];
+ULLONG_FOR_EACH_1(i, keys_map) {
+hashes[i] = netdev_flow_key_hash_in_mask(keys[i],
+ >mask);
+}
+
+/* Lookup. */
+const struct cmap_node *nodes[NETDEV_MAX_BURST];
+uint32_t found_map =
+cmap_find_batch(>rules, keys_map, hashes, nodes);
+/* Check results.  When the i-th bit of found_map is set, it means
+ * that a set of nodes with a matching hash value was found for the
+ * i-th search-key.  Due to possible hash collisions we need to check
+ * which of the found rules, if any, really matches our masked
+ * search-key. */
+ULLONG_FOR_EACH_1(i, found_map) {
+struct dpcls_rule *rule;
+
+CMAP_NODE_FOR_EACH (rule, cmap_node, nodes[i]) {
+if (OVS_LIKELY(dpcls_rule_matches_key(rule, keys[i]))) {
+rules[i] = rule;
+/* Even at 20 Mpps the 32-bit hit_cnt cannot wrap
+ * within one second optimization interval. */
+subtable->hit_cnt++;
+goto next;
+}
+}
+/* None of the found rules was a match.  Reset the i-th bit to
+ * keep searching this key in the next subtable. */
+ULLONG_SET0(found_map, i);  /* Did not match. */
+next:
+

Re: [ovs-dev] [PATCH v9 2/5] dpif-netdev: move dpcls lookup structures to .h

2019-05-15 Thread Ian Stokes

On 5/8/2019 4:13 PM, Harry van Haaren wrote:

This commit moves some data-structures to be available
in the dpif-netdev.h header. This allows specific implementations
of the subtable lookup function to include just that header
file, and not require that the code exists in dpif-netdev.c

Signed-off-by: Harry van Haaren 



Thanks for the patch Harry, minor comments below.

I assume for reviewing purposes you've broken this out from patch 1?



---

v6:
- Fix double * in code comments (Eelco)
- Reword comment on lookup_func for clarity (Harry)
- Rebase fixups
---
  lib/dpif-netdev.c | 50 -
  lib/dpif-netdev.h | 52 +++
  2 files changed, 52 insertions(+), 50 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index e2e2c14e7..b5c3dad3c 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -128,15 +128,6 @@ static struct odp_support dp_netdev_support = {
  .ct_orig_tuple6 = true,
  };
  
-/* Stores a miniflow with inline values */

-
-struct netdev_flow_key {
-uint32_t hash;   /* Hash function differs for different users. */
-uint32_t len;/* Length of the following miniflow (incl. map). */
-struct miniflow mf;
-uint64_t buf[FLOW_MAX_PACKET_U64S];
-};
-
  /* EMC cache and SMC cache compose the datapath flow cache (DFC)
   *
   * Exact match cache for frequently used flows
@@ -7572,47 +7563,6 @@ dpif_dummy_register(enum dummy_level level)
  
  /* Datapath Classifier. */
  
-/* forward declaration for lookup_func typedef */

-struct dpcls_subtable;
-
-/* Lookup function for a subtable in the dpcls. This function is called
- * by each subtable with an array of packets, and a bitmask of packets to
- * perform the lookup on. Using a function pointer gives flexibility to
- * optimize the lookup function based on subtable properties and the
- * CPU instruction set available at runtime.
- */
-typedef uint32_t (*dpcls_subtable_lookup_func)(struct dpcls_subtable *subtable,
-uint32_t keys_map, const struct netdev_flow_key *keys[],
-struct dpcls_rule **rules);
-
-/* Prototype for generic lookup func, using same code path as before */
-uint32_t
-dpcls_subtable_lookup_generic(struct dpcls_subtable *subtable,
-  uint32_t keys_map,
-  const struct netdev_flow_key *keys[],
-  struct dpcls_rule **rules);
-
-
-/* A set of rules that all have the same fields wildcarded. */
-struct dpcls_subtable {
-/* The fields are only used by writers. */
-struct cmap_node cmap_node OVS_GUARDED; /* Within dpcls 'subtables_map'. */
-
-/* These fields are accessed by readers. */
-struct cmap rules;   /* Contains "struct dpcls_rule"s. */
-uint32_t hit_cnt;/* Number of match hits in subtable in current
-optimization interval. */
-
-/* the lookup function to use for this subtable. If there is a known
- * property of the subtable (eg: only 3 bits of miniflow metadata is
- * used for the lookup) then this can point at an optimized version of
- * the lookup function for this particular subtable. */
-dpcls_subtable_lookup_func lookup_func;
-
-struct netdev_flow_key mask; /* Wildcards for fields (const). */
-/* 'mask' must be the last field, additional space is allocated here. */
-};
-
  static void
  dpcls_subtable_destroy_cb(struct dpcls_subtable *subtable)
  {
diff --git a/lib/dpif-netdev.h b/lib/dpif-netdev.h
index 6db6ed2e2..4cd2ceea7 100644
--- a/lib/dpif-netdev.h
+++ b/lib/dpif-netdev.h
@@ -24,6 +24,7 @@
  #include "openvswitch/types.h"
  #include "dp-packet.h"
  #include "packets.h"
+#include "cmap.h"


Typically ovs header header files are added in alphabetical order. I see 
from above the headers are out of order already before your change but 
you might consider adding cmap.h before dpif.h.


  
  #ifdef  __cplusplus

  extern "C" {
@@ -38,6 +39,57 @@ bool dpif_is_netdev(const struct dpif *);
  #define NR_QUEUE   1
  #define NR_PMD_THREADS 1
  
+/* forward declaration for lookup_func typedef */

+struct dpcls_subtable;
+struct dpcls_rule;
+
+/* must be public as it is intantiated in subtable struct below */Minor typo 
in intantiated, comment capitalization and period.


Ian

+struct netdev_flow_key {
+uint32_t hash;   /* Hash function differs for different users. */
+uint32_t len;/* Length of the following miniflow (incl. map). */
+struct miniflow mf;
+uint64_t buf[FLOW_MAX_PACKET_U64S];
+};
+
+/* Lookup function for a subtable in the dpcls. This function is called
+ * by each subtable with an array of packets, and a bitmask of packets to
+ * perform the lookup on. Using a function pointer gives flexibility to
+ * optimize the lookup function based on subtable properties and the
+ * CPU instruction set available at runtime.
+ */
+typedef uint32_t 

  1   2   3   4   >