[ovs-dev] [PATCHv11 0/5] Revalidate flows with unique identifiers.

Joe Stringer joestringer at nicira.com
Wed Nov 26 01:07:57 UTC 2014


=== Summary ===

Patches 1,4,5 are not yet reviewed. The linux datapath patches are not included
in this series, as I intend to rebase them against linux net-next and push them
through the review process on the netdev list.

This series is also made available here to assist review:
https://github.com/joestringer/openvswitch/tree/submit/ufid_v11

(Or with datapath changes as well, wip:)
https://github.com/joestringer/openvswitch/tree/submit/ufid_v11+datapath

=== Description ===

This series modifies the dpif interface for flow commands to use 128-bit unique
identifiers as an alternative to the netlink-formatted flow key, and caches the
mask/actions in the udpif_key. With datapath support, this significantly
reduces the cost of assembling messages between revalidators and the datapath,
improving revalidation performance by 40% or more. In a test environment of
many short-lived flows constantly being set up in the datapath, this increases
the number of flows that can be maintained in the linux datapath from around
130-140K up to 190-200K. For the userspace datapath, this decreases the time
spent revalidating 160K flows from 250ms to 150ms.

The core of the changes sits in the handler and revalidator code. Handlers take
responsibility for creating udpif_key cache entries which now include a copy of
the flow mask and actions. Revalidators request datapaths to dump flows using
only the unique identifier and stats, rather than the full set of
netlink-formatted flow key, mask and actions.

In cases where full revalidation is required, revalidators will use the
udpif_key cache of the key/mask/acts to validate the flow. The dpif will
detect datapath support for the unique identifer "UFID" feature, and omit flow
keys from netlink transactions if it is supported. For backwards compatibility,
flow keys will always be serialised if UFID support is not detected in the
datapath.

=== Changelog ===

v11:
- Pushed most of the prerequisite patches for this series to master.
- Split out openvswitch.h interface changes from datapath implementation
- Datapath implementation to be reviewed on net-next, separately
- Rebased

v10:
- New patch allowing datapath to serialize masked keys
- New patch providing commandline parsing of UFIDs
- New patch to fix IP fragment testsuite failure
- Simplify datapath interface by accepting UFID or flow_key, but not both
- Flows set up with UFID must be queried/deleted using UFID
- Reduce sw_flow memory usage for UFID
- Don't periodically rehash UFID table in linux datapath
- Remove kernel_only UFID in linux datapath
- Track whether UFIDs are present in datapath in udpif_key

v9:
- New patch to enable verbose flow-dumping in ovs-bugtool
- Don't print UFIDs by default in ovs-dpctl, ovs-appctl dump-flows output
- Userspace datapath performance and correctness improvements

v8:
- Rename UID -> UFID
- Clarify dpif interface descriptions
- Remove 'struct odputil_uidbuf'
- Simplify dpif-netlink UFID marshalling
- 32-bit build fix
- Fix null dereference in datapath when paired with older userspace
- Don't generate UFIDs for feature probes or ovs-dpctl usage
- Rebase
- All patches are reviewed/acked except datapath changes.

v7:
- Remove OVS_DP_F_INDEX_BY_UID
- Rework datapath UID serialization for variable length UIDs
- Create ukeys from revalidator threads in corner cases
- Hide "terse" flags from flow_get,flow_del dpif interface
- Scattered replacements of memcpy with u128_equal()
- Rebase

v6:
- Address feedback from Ben
- Split out "dpif: Add Unique flow identifiers." into three patches
- Reduce netlink conversions for all datapaths
- Reduce udpif_key footprint
- Added x64 version of murmurhash3
- Added hash function tests
- Various bugfixes
- Rebase

v5:
- Rebase
- Various bugfixes
- Improve logging

v4:
- Datapath memory leak fixes
- Enable UID-based terse dumping and deleting by default
- Shifted UID generation down to dpif
- Log flow UIDs in more places
- Various fixes

RFCv3:
- Add datapath implementation
- Minor fixes
- Rebased

RFCv2:
- Revised early patches from v1 feedback
- Add Acks from Ben
- Rebased

Joe Stringer (5):
  datapath: Add UFID interface to openvswitch.h.
  dpif: Index flows using unique identifiers.
  dpif: Minimize memory copy for revalidation.
  dpctl: Add support for using UFID to add/del flows.
  ovs-bugtool: Log more detail for dumped flows.

 datapath/README.md                                |   13 ++
 datapath/linux/compat/include/linux/openvswitch.h |   19 ++
 lib/dpctl.c                                       |   47 +++-
 lib/dpif-netdev.c                                 |  156 ++++++++------
 lib/dpif-netlink.c                                |  236 ++++++++++++++++++---
 lib/dpif-provider.h                               |   13 +-
 lib/dpif.c                                        |   50 ++++-
 lib/dpif.h                                        |   33 ++-
 lib/odp-util.c                                    |   42 ++++
 lib/odp-util.h                                    |    2 +
 ofproto/ofproto-dpif-upcall.c                     |  228 +++++++++++++++-----
 ofproto/ofproto-dpif.c                            |   14 +-
 tests/dpif-netdev.at                              |    5 +
 tests/ofproto-dpif.at                             |   28 +--
 tests/ofproto-macros.at                           |    1 +
 utilities/bugtool/ovs-bugtool-ovs-appctl-dpif     |    4 +-
 utilities/bugtool/ovs-bugtool.in                  |    2 +-
 17 files changed, 706 insertions(+), 187 deletions(-)

-- 
1.7.10.4




More information about the dev mailing list