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

Jarno Rajahalme jrajahalme at nicira.com
Wed Jun 10 00:24:07 UTC 2015


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

Changes since v3:

- Added classifier testing for versioning features (patch 05).

- Added 'version' to cls_rule, since all users needed one anyway.
  This is now used also making iterations version-aware (Any version
  can be iterated) (patch 03).

- Classifier API changes are slightly simplified from v3.


Changes since v2:

- 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 02).
 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 03).

- 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 04).

- 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):
  ofproto: Rename *_begin functions as *_start.
  ovs-ofctl: Add bundle support and unit testing.
  classifier: Support table versioning
  classifier: Make traversing identical rules robust.
  test-classifier: Test versioning features.
  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                   |  349 +++++-----
 lib/classifier.h                   |  150 ++--
 lib/match.c                        |    9 +
 lib/match.h                        |    1 +
 lib/ofp-parse.c                    |   40 +-
 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                   |    7 +-
 lib/tnl-ports.c                    |    9 +-
 lib/vconn.c                        |  238 ++++++-
 ofproto/bundles.h                  |   15 +-
 ofproto/connmgr.c                  |    2 +-
 ofproto/ofproto-dpif-xlate.c       |   17 +-
 ofproto/ofproto-dpif.c             |  128 ++--
 ofproto/ofproto-dpif.h             |    5 +-
 ofproto/ofproto-provider.h         |   78 +--
 ofproto/ofproto.c                  | 1336 +++++++++++++++++++++---------------
 tests/classifier.at                |    8 +-
 tests/ofproto-macros.at            |   10 +
 tests/ofproto.at                   |  244 +++++++
 tests/ovs-ofctl.at                 |  107 +++
 tests/test-classifier.c            |  301 ++++++--
 utilities/ovs-ofctl.8.in           |   59 +-
 utilities/ovs-ofctl.c              |   91 ++-
 33 files changed, 2558 insertions(+), 1001 deletions(-)

-- 
1.7.10.4




More information about the dev mailing list