[ovs-dev] [PATCH v3 0/3] Use improved dp_hash select group by default

Jan Scheurich jan.scheurich at ericsson.com
Fri Apr 27 12:20:31 UTC 2018


The current default OpenFlow select group implementation sends every new L4 flow
to the slow path for the balancing decision and installs a 5-tuple "miniflow"
in the datapath to forward subsequent packets of the connection accordingly. 
Clearly this has major scalability issues with many parallel L4 flows and high
connection setup rates.

The dp_hash selection method for the OpenFlow select group was added to OVS
as an alternative. It avoids the scalability issues for the price of an 
additional recirculation in the datapath. The dp_hash method is only available
to OF1.5 SDN controllers speaking the Netronome Group Mod extension to 
configure the selection mechanism. This severely limited the applicability of
the dp_hash select group in the past.

Furthermore, testing revealed that the implemented dp_hash selection often
generated a very uneven distribution of flows over group buckets and didn't 
consider bucket weights at all.

The present patch set in a first step improves the dp_hash selection method to
much more accurately distribute flows over weighted group buckets and to
apply a symmetric dp_hash function to maintain the symmetry property of the
legacy hash function. In a second step it makes the improved dp_hash method
the default in OVS for select groups that can be accurately handled by dp_hash.
That should be the vast majority of cases. Otherwise we fall back to the
legacy slow-path selection method.

The Netronome extension can still be used to override the default decision and
require the legacy slow-path or the dp_hash selection method.

v2 -> v3:
    - Fixed another corner case crash reported by Chen Yuefang.
    - Fixed several sparse and clang warnings reported by Ben.
    - Rewritten the select group unit tests to abstract the checks from
      the behavior of the system-specific hash function implementation.
    - Added dpif_backer_support field for dp_hash algorithms to prevent
      using the new OVS_HASH_L4_SYMMETRIC algorithm if it is not 
      supported by the datapath.

v1 -> v2:
    - Fixed crashes for corner cases reported by Chen Yuefang.
    - Fixed group ref leakage with dp_hash reported by Chen Yuefang.
    - Changed all xlation logging from INFO to DBG.
    - Revised, completed and detailed select group unit test cases in ofproto-dpif.
    - Updated selection_method documentation in ovs-ofctl man page.
    - Added NEWS item.


Jan Scheurich (3):
  userspace datapath: Add OVS_HASH_L4_SYMMETRIC dp_hash algorithm
  ofproto-dpif: Improve dp_hash selection method for select groups
  ofproto-dpif: Use dp_hash as default selection method

 NEWS                                              |   2 +
 datapath/linux/compat/include/linux/openvswitch.h |   4 +
 include/openvswitch/ofp-group.h                   |   1 +
 lib/flow.c                                        |  43 ++-
 lib/flow.h                                        |   1 +
 lib/odp-execute.c                                 |  23 +-
 lib/odp-util.c                                    |   4 +-
 lib/ofp-group.c                                   |  15 +-
 ofproto/ofproto-dpif-xlate.c                      |  89 ++++--
 ofproto/ofproto-dpif.c                            | 209 +++++++++++++-
 ofproto/ofproto-dpif.h                            |  19 +-
 ofproto/ofproto-provider.h                        |   2 +-
 tests/mpls-xlate.at                               |  26 +-
 tests/ofproto-dpif.at                             | 314 +++++++++++++++++-----
 tests/ofproto-macros.at                           |   7 +-
 utilities/ovs-ofctl.8.in                          |  47 ++--
 16 files changed, 667 insertions(+), 139 deletions(-)

-- 
1.9.1



More information about the dev mailing list