[ovs-dev] [PATCH v3 00/12] Atomic bundles with classifier versioning.

Jarno Rajahalme jrajahalme at nicira.com
Fri Jun 5 22:08:40 UTC 2015


This series adds support for atomic flow mod bundles with classifier
versioning.

Changes since v2:

- F_OUT_PORT parsing is fixed as per Ben's suggestion (patch 01).

- ovs-ofctl 'bundle' command added in v2 is now folded in to the
  existing 'add-flow' and 'add-flows' commands.  Flow mods are
  executed serially, separated by barriers, so this new behavior works
  with all versions of OpenFlow.  With the new '--bundle' option the
  mods are executed as an ordered OpenFlow 1.4 bundle (patch 03).
  Later patches in the series make these bundles also atomic.

- Classifier 'to_be_removed' and 'visible' flags are now folded in
  into a single 'visibility' attribute, which also has cleaner
  definition than in v2 (patch 04).

- Classifier traversing of identical rules list is now more robust.
  It has been somewhat fragile since the support for duplicates with
  identical priorities was recently added (patch 05).

- Flow counts in each oftable are now explicitly maintained so that
  versioning is taken into account.  Earlier (since patch 07) the
  count of rules in a classifier was used as the table's flow count,
  but now that the classifier may temporarily hold duplicate rules
  visible in different versions, and the removals are RCU-postponed,
  the classifier rule count no longer represents the control plane
  notion of table's rule count (patch 08).

- Handling evictions was broken in v2 (and in patch 07), as eviction
  took place early in the commit, and actually inappropriately bumped
  the version number too early.  Now eviction is treated much like a
  flow modification, where a new rule replaces the old one, but just
  without any 'inheritance' from the evicted rule to the new rule.
  This makes evictions to be executed only when commit is successful,
  as evictions are reverted like any other changes when the commit
  fails (patch 09).

- Sending flow removed messages is now postponed to the actual
  destruction of the rule.  Previously, the rule could have accrued
  stats even after the flow removed messages was sent (patch 10).

- Bundled messages now take less momory by using a struct minimatch
  instead of a struct match for flow mods (patch 11).

- Bundles now support also port mods, but only for non-atomic bundles.
  The reason for this is that we have easy way of making port status
  changes atomic w.r.t. classifier version number changes (patch 12).

For correctness, patches 07, 08, and 09 need to be squashed before
committing, but these are separated in this series to make reviewing
easier (and as a test for Ben for either reading this text or noticing
the problems while reading patch 07 :-).

Jarno Rajahalme (12):
  ofp-parse: Use F_OUT_PORT when parsing.
  ofproto: Rename *_begin functions as *_start.
  ovs-ofctl: Add bundle support and unit testing.
  classifier: Support table versioning
  classifier: Make traversing identical rules robust.
  ofproto: Infra for table versioning.
  Use classifier versioning.
  ofproto: Accurate flow counts.
  ofproto: Revertible eviction.
  ofproto: Postpone sending flow removed messages.
  ofproto: Use minimatch for making bundles smaller.
  ofproto: Support port mods in bundles.

 NEWS                               |   25 +-
 OPENFLOW-1.1+.md                   |    6 +
 include/openflow/openflow-common.h |    2 +
 include/openvswitch/vconn.h        |    3 +
 lib/classifier-private.h           |  158 ++++-
 lib/classifier.c                   |  297 +++++----
 lib/classifier.h                   |  112 ++--
 lib/match.c                        |    9 +
 lib/match.h                        |    1 +
 lib/ofp-parse.c                    |   42 +-
 lib/ofp-parse.h                    |    6 +-
 lib/ofp-print.c                    |    1 +
 lib/ofp-util.c                     |   44 ++
 lib/ofp-util.h                     |  102 +--
 lib/ofp-version-opt.c              |    7 +
 lib/ofp-version-opt.h              |    1 +
 lib/ovs-router.c                   |    2 +-
 lib/tnl-ports.c                    |    9 +-
 lib/vconn.c                        |  238 ++++++-
 ofproto/bundles.h                  |   20 +-
 ofproto/connmgr.c                  |    2 +-
 ofproto/ofproto-dpif-xlate.c       |   17 +-
 ofproto/ofproto-dpif.c             |  128 ++--
 ofproto/ofproto-dpif.h             |    5 +-
 ofproto/ofproto-provider.h         |   77 +--
 ofproto/ofproto.c                  | 1289 +++++++++++++++++++++---------------
 tests/ofproto-macros.at            |   10 +
 tests/ofproto.at                   |  244 +++++++
 tests/ovs-ofctl.at                 |  115 +++-
 tests/test-classifier.c            |   15 +-
 utilities/ovs-ofctl.8.in           |   59 +-
 utilities/ovs-ofctl.c              |   89 ++-
 32 files changed, 2234 insertions(+), 901 deletions(-)

-- 
1.7.10.4




More information about the dev mailing list