[ovs-dev] [PATCH 0/8] DPIF Function Pointer RFC/v1

Harry van Haaren harry.van.haaren at intel.com
Tue Oct 6 14:54:29 UTC 2020


Hi OVS Community,

This patchset is an RFC/v1 for making the DPIF component 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 component 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.

Note:
1) This patchset includes only scalar code changes
2) The AVX512 DPIF impl is underway, will include in a future version
3) Some "extra goodies" are included here (patches 1,6 and 7).
   If preferred, they can be split into a seperate patchset?

Questions welcomed! Regards, -Harry


Harry van Haaren (8):
  dpif-netdev: optimize dp output action
  dpif-netdev: refactor emc and smc into dfc header
  dpif-netdev: move netdev flow struct to header
  dpif-netdev: refactor to multiple header files
  dpif-netdev: split hwol out to own header file
  dpif-netdev/dpcls: refactor function names to dpcls
  dpif-netdev: move pmd_try_optimize function in file
  dpif-netdev: add function pointer for netdev input

 lib/automake.mk                        |   5 +
 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          | 205 ++++++++
 lib/dpif-netdev-private-dpcls.h        | 111 ++++
 lib/dpif-netdev-private-flow.h         | 151 ++++++
 lib/dpif-netdev-private-thread.h       | 216 ++++++++
 lib/dpif-netdev-private.h              | 100 +---
 lib/dpif-netdev.c                      | 686 ++++---------------------
 11 files changed, 813 insertions(+), 666 deletions(-)
 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-flow.h
 create mode 100644 lib/dpif-netdev-private-thread.h

-- 
2.17.1



More information about the dev mailing list