[ovs-dev] [PATCH v3 00/10] DPIF & MFEX Refactor and AVX512 SIMD optimization

Harry van Haaren harry.van.haaren at intel.com
Wed Nov 18 16:14:51 UTC 2020


v3 update Summary:
(Cian Ferriter helping with rebases, review and code cleanups)
- Split out partially related changes (these will be sent separately)
--- netdev output action optimization
--- avx512 dpcls 16-block support optimization
- Squash commit which moves netdev struct flow into the refactor commit:
--- Squash dpif-netdev: move netdev flow struct to header
--- Into dpif-netdev: Refactor to multiple header files
- Implement Miniflow extract for AVX-512 DPIF
--- A generic method of matching patterns and packets is implemented,
    providing traffic-pattern specific miniflow-extract acceleration.
--- The patterns today are hard-coded, however in a future patchset it
    is intended to make these runtime configurable, allowing users to
    optimize the SIMD miniflow extract for active traffic types.
- Notes:
--- 32 bit builds will be fixed in next release by adding flexible
    miniflow extract optimization selection.
--- AVX-512 VBMI ISA is not yet supported in OVS due to requiring the
    DPDK 20.11 update for RTE_CPUFLAG_*. Once on a newer DPDK this will
    be added.

v2 updates:
- Includes DPIF command switching at runtime
- Includes AVX512 DPIF implementation
- Includes some partially related changes (can be split out of set?)
--- netdev output action optimization
--- avx512 dpcls 16-block support optimization

Hi OVS Community,

This patchset is a v3 for making the DPIF and miniflow extract (MFEX)
components of the userspace datapath more flexible. The same approach
as has been previously used for DPCLS is used here, where a function
pointer allows selection of an implementation at runtime.

The flexibility from the above changes enables ISA optimized
implementations of the DPIF and MFEX of the datapath. As these
ISA optimized implementations also require access to EMC/SMC/HWOL
features, these have been split out to seperate header files.

The file splitting also improves maintainability, as dpif_netdev.c
has ~9000 LOC, and very hard to modify due to many structs defined
locally in the .c file, ruling out re-usability in other .c files.

Questions welcomed! Regards, -Harry



Harry van Haaren (10):
  dpdk: Cache result of CPU ISA checks
  dpif-netdev: Move pmd_try_optimize function in file
  dpif-netdev: Refactor to multiple header files
  dpif-netdev: Split hwol out to own header file
  dpif-netdev: Add function pointer for netdev input
  dpif-avx512: Add ISA implementation of dpif
  dpif-netdev: Add command to switch dpif implementation
  dpif-netdev/dpcls: Refactor function names to dpcls
  dpif-netdev: enable ISA optimized DPIF and miniflow extract
  dpif-netdev: enable scalar datapath with optimized miniflow extract

 acinclude.m4                           |  15 +
 configure.ac                           |   1 +
 lib/automake.mk                        |  13 +-
 lib/dpdk.c                             |  26 +-
 lib/dpif-netdev-avx512-extract.h       | 435 +++++++++++
 lib/dpif-netdev-avx512.c               | 212 ++++++
 lib/dpif-netdev-lookup-autovalidator.c |   1 -
 lib/dpif-netdev-lookup-avx512-gather.c |   1 -
 lib/dpif-netdev-lookup-generic.c       |   1 -
 lib/dpif-netdev-lookup.h               |   2 +-
 lib/dpif-netdev-private-dfc.h          | 244 ++++++
 lib/dpif-netdev-private-dpcls.h        | 127 ++++
 lib/dpif-netdev-private-dpif.c         | 104 +++
 lib/dpif-netdev-private-dpif.h         |  61 ++
 lib/dpif-netdev-private-extract.h      |  52 ++
 lib/dpif-netdev-private-flow.h         | 155 ++++
 lib/dpif-netdev-private-hwol.h         |  63 ++
 lib/dpif-netdev-private-thread.h       | 220 ++++++
 lib/dpif-netdev-private.h              | 123 +---
 lib/dpif-netdev.c                      | 979 ++++++++-----------------
 20 files changed, 2082 insertions(+), 753 deletions(-)
 create mode 100644 lib/dpif-netdev-avx512-extract.h
 create mode 100644 lib/dpif-netdev-avx512.c
 create mode 100644 lib/dpif-netdev-private-dfc.h
 create mode 100644 lib/dpif-netdev-private-dpcls.h
 create mode 100644 lib/dpif-netdev-private-dpif.c
 create mode 100644 lib/dpif-netdev-private-dpif.h
 create mode 100644 lib/dpif-netdev-private-extract.h
 create mode 100644 lib/dpif-netdev-private-flow.h
 create mode 100644 lib/dpif-netdev-private-hwol.h
 create mode 100644 lib/dpif-netdev-private-thread.h

-- 
2.25.1



More information about the dev mailing list