[ovs-dev] [PATCH v3 7/7] docs/dpdk/bridge: add datapath performance section

Harry van Haaren harry.van.haaren at intel.com
Wed Jun 10 10:48:39 UTC 2020


This commit adds a section to the dpdk/bridge.rst netdev documentation,
detailing the added DPCLS functionality. The newely added commands are
documented, and sample output is provided.

Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
---
 Documentation/topics/dpdk/bridge.rst | 63 ++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/Documentation/topics/dpdk/bridge.rst b/Documentation/topics/dpdk/bridge.rst
index f0ef42ecc..2ada76571 100644
--- a/Documentation/topics/dpdk/bridge.rst
+++ b/Documentation/topics/dpdk/bridge.rst
@@ -137,3 +137,66 @@ currently turned off by default.
 To turn on SMC::
 
     $ ovs-vsctl --no-wait set Open_vSwitch . other_config:smc-enable=true
+
+Datapath Classifier Performance
+-------------------------------
+
+The datapath classifier (dpcls) performs wildcard rule matching, a compute
+intensive process of matching a packet ``miniflow`` to a rule ``miniflow``. The
+code that does this compute work impacts datapath performance, and optimizing
+it can provide higher switching performance.
+
+Modern CPUs provide extensive SIMD instructions which can be used to get higher
+performance. The CPU OVS is being deployed on must be capable of running these
+SIMD instructions in order to take advantage of the performance benefits.
+In OVS v2.14 runtime CPU detection was introduced to enable identifing if these
+CPU ISA additions are available, and to allow the user to enable them.
+
+OVS provides multiple implementations of dpcls. The following command enables
+the user to check what implementations are available in a running instance ::
+
+    $ ovs-appctl dpif-netdev/subtable-lookup-get
+    Available lookup functions (priority : name)
+            0 : autovalidator
+            1 : generic
+            0 : avx512_gather
+
+To set the priority of a lookup function, run the ``prio-set`` command ::
+
+    $ ovs-appctl dpif-netdev/subtable-lookup-prio-set avx512_gather 5
+    Lookup priority change affected 1 dpcls ports and 1 subtables.
+
+The highest priority lookup function is used for classification, and the output
+above indicates that one subtable of one DPCLS port is has changed its lookup
+function due to the command being run. To verify the prioritization, re-run the
+get command, note the updated priority of the ``avx512_gather`` function ::
+
+    $ ovs-appctl dpif-netdev/subtable-lookup-get
+    Available lookup functions (priority : name)
+            0 : autovalidator
+            1 : generic
+            5 : avx512_gather
+
+If two lookup functions have the same priority, the first one in the list is
+chosen, and the 2nd occurance of that priority is not used. Put in logical
+terms, a subtable is chosen if its priority is greater than the previous
+best candidate.
+
+CPU ISA Testing and Validation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+As multiple versions of DPCLS can co-exist, each with different CPU ISA
+optimizations, it is important to validate that they all give the exact same
+results. To easily test all DPCLS implementations, an ``autovalidator``
+implementation of the DPCLS exists. This implementation runs all other
+available DPCLS implementations, and verifies that the results are identical.
+
+Running the OVS unit tests with the autovalidator enabled ensures all
+implementations provide the same results. Note that the performance of the
+autovalidator is lower than all other implementations, as it tests the scalar
+implementation against itself, and against all other enabled DPCLS
+implementations.
+
+To adjust the DPCLS autovalidator priority, use this command ::
+
+    $ ovs-appctl dpif-netdev/subtable-lookup-prio-set autovalidator 7
-- 
2.17.1



More information about the dev mailing list