[ovs-git] [openvswitch/ovs] e90e11: dpif-netdev: implement subtable lookup validation.

istokes noreply at github.com
Mon Jul 13 14:33:53 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: e90e115a01afe7001863582b65fdaa278794e610
      https://github.com/openvswitch/ovs/commit/e90e115a01afe7001863582b65fdaa278794e610
  Author: Harry van Haaren <harry.van.haaren at intel.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M acinclude.m4
    M configure.ac
    M lib/automake.mk
    A lib/dpif-netdev-lookup-autovalidator.c
    M lib/dpif-netdev-lookup-generic.c
    A lib/dpif-netdev-lookup.c
    A lib/dpif-netdev-lookup.h
    M lib/dpif-netdev-private.h
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: implement subtable lookup validation.

This commit refactors the existing dpif subtable function pointer
infrastructure, and implements an autovalidator component.

The refactoring of the existing dpcls subtable lookup function
handling, making it more generic, and cleaning up how to enable
more implementations in future.

In order to ensure all implementations provide identical results,
the autovalidator is added. The autovalidator itself implements
the subtable lookup function prototype, but internally iterates
over all other available implementations. The end result is that
testing of each implementation becomes automatic, when the auto-
validator implementation is selected.

Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
Acked-by: William Tu <u9012063 at gmail.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: 3d018c3ea79d751ed3e928a01120edfcbb7bff9d
      https://github.com/openvswitch/ovs/commit/3d018c3ea79d751ed3e928a01120edfcbb7bff9d
  Author: Harry van Haaren <harry.van.haaren at intel.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: add subtable lookup prio set command.

This commit adds a command for the dpif-netdev to set a specific
lookup function to a particular priority level. The command enables
runtime switching of the dpcls subtable lookup implementation.

Selection is performed based on a priority. Higher priorities take
precedence, e.g. priority 5 will be selected instead of a priority 3.
If lookup functions have the same priority, the first one in the list
is selected.

The two options available are 'autovalidator' and 'generic'.
The below command will set a new priority for the given function:
$ ovs-appctl dpif-netdev/subtable-lookup-prio-set generic 2

The autovalidator implementation can be selected at runtime now:
$ ovs-appctl dpif-netdev/subtable-lookup-prio-set autovalidator 5

Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
Acked-by: William Tu <u9012063 at gmail.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: 9ff7cabfd78dc6736f4094400135f03fa3b9a3e3
      https://github.com/openvswitch/ovs/commit/9ff7cabfd78dc6736f4094400135f03fa3b9a3e3
  Author: Harry van Haaren <harry.van.haaren at intel.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: add subtable-lookup-prio-get command.

This commit adds a new command, "dpif-netdev/subtable-lookup-prio-get"
which prints the available subtable lookup functions in this OVS binary.
Example output from the command:

Available lookup functions (priority : name)
        0 : autovalidator
        1 : generic

Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
Acked-by: William Tu <u9012063 at gmail.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: b250b39a7aa61881ded34ef1a0fffb6768fd7a49
      https://github.com/openvswitch/ovs/commit/b250b39a7aa61881ded34ef1a0fffb6768fd7a49
  Author: Harry van Haaren <harry.van.haaren at intel.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M lib/dpdk-stub.c
    M lib/dpdk.c
    M lib/dpdk.h

  Log Message:
  -----------
  dpdk: enable CPU feature detection.

This commit implements a method to retrieve the CPU ISA capabilities.
These ISA capabilities can be used in OVS to at runtime select a function
implementation to make the best use of the available ISA on the CPU.

Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
Acked-by: William Tu <u9012063 at gmail.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: 352b6c7116cdc096c879fc4fa9ed5fe9c2ccef3b
      https://github.com/openvswitch/ovs/commit/352b6c7116cdc096c879fc4fa9ed5fe9c2ccef3b
  Author: Harry van Haaren <harry.van.haaren at intel.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M configure.ac
    M lib/automake.mk
    A lib/dpif-netdev-lookup-avx512-gather.c
    M lib/dpif-netdev-lookup.c
    M lib/dpif-netdev-lookup.h
    M m4/openvswitch.m4

  Log Message:
  -----------
  dpif-lookup: add avx512 gather implementation.

This commit adds an AVX-512 dpcls lookup implementation.
It uses the AVX-512 SIMD ISA to perform multiple miniflow
operations in parallel.

To run this implementation, the "avx512f" and "bmi2" ISAs are
required. These ISA checks are performed at runtime while
probing the subtable implementation. If a CPU does not provide
both "avx512f" and "bmi2", then this code does not execute.

The avx512 code is built as a separate static library, with added
CFLAGS to enable the required ISA features. By building only this
static library with avx512 enabled, it is ensured that the main OVS
core library is *not* using avx512, and that OVS continues to run
as before on CPUs that do not support avx512.

The approach taken in this implementation is to use the
gather instruction to access the packet miniflow, allowing
any miniflow blocks to be loaded into an AVX-512 register.
This maximizes the usefulness of the register, and hence this
implementation handles any subtable with up to miniflow 8 bits.

Note that specialization of these avx512 lookup routines
still provides performance value, as the hashing of the
resulting data is performed in scalar code, and compile-time
loop unrolling occurs when specialized to miniflow bits.

This commit checks at configure time if the assembling in use
has a known bug in assembling AVX512 code. If this bug is present,
all AVX512 code is disabled. Checking the version string of the binutils
or assembler is not a good method to detect the issue, as back ported
fixes would not be reflected.

Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
Acked-by: William Tu <u9012063 at gmail.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: 842c363050b1099f272c8626ff1c89536e5f5c75
      https://github.com/openvswitch/ovs/commit/842c363050b1099f272c8626ff1c89536e5f5c75
  Author: Harry van Haaren <harry.van.haaren at intel.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M Documentation/intro/install/dpdk.rst
    M Documentation/topics/dpdk/bridge.rst
    M NEWS

  Log Message:
  -----------
  docs/dpdk/bridge: add datapath performance section.

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

Running the DPCLS autovalidator with unit tests by default is possible
through re-compiling the autovalidator to have the highest priority at
startup time. This avoids making changes to all tests, and enables
debug and CI builds to validate every lookup implementation with all
unit tests.

Add NEWS updates for CPU ISA, dynamic subtables, and AVX512 lookup.

Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
Acked-by: William Tu <u9012063 at gmail.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


Compare: https://github.com/openvswitch/ovs/compare/fa31efd21114...842c363050b1


More information about the git mailing list