This series adds group support for OpenFlow bundles, and reduces the
memory footprint of bundled messages.

To make groups in bundles useful we need to make groups versioned, so
that atomic bundles are supported, which in turn requires RCU to be
used for group's memory management.  We also need the locking to be
compatible with bundles (use ofproto_mutex).  Since we don't want to
hold this mutex for excessive periods of time, we need to keep
reference to the referring rules explicitly, so that we do not need to
do full classifier iterations to find the rules.

Handling of flow mods needs also change to check the existence of the
group referred by an group action to the bundle commit execution time,
as the group may have been just inserted by an earlier message in the
same bundle.

To make groups in bundles practical we also have to reduce group's
memory footprint, which is currently more than 20kb due to an large
array of large mf_values.

Finally, this series also refactors the way flow mods are managed in
bundles to reduce the memory footprint of bundle build-up and
execution.  The main strategy here is to create the new rule at the
time of flow_mod's insertion to the bundle, and then get rid of the
relatively large ofputil_flow_mod.  To this end the initial error
checking is split between the new 'init' and old 'start' phases.
Since the affected 'old' rules can only be collected at the 'start'
phase, the initially created rule may need to be modified later to
implement 'modyfy' semantics.

The series also includes some bug fixes:

 - The 'used' timestamp was not forwarded from the replaced rule when
   'reset_counts' flag was specified.  Earlier we failed to reset the
   counts on OF1.0 and OF1.1 where the behavior is implied, but the
   flag is not present in the ofputil_flow_mod.
 - We failed to report the counts of flow mods from bundles.

Jarno Rajahalme (26):
  lib: Separate versioning to its own module.
  ofproto: Lockless group lookups.
  ofproto: Take group references only when needed.
  ofproto: Make flow handling more symmetric.
  ofproto: Use ofproto_mutex for groups and keep track of referring
    flows.
  ofproto: Add generic ofproto_collection.
  ofproto: Generalize flow_mod_requester.
  ofproto: Report flow mods also from bundles.
  ofproto: refactor group mods.
  ofproto: Make groups versioned.
  vconn: Update length of bundled messages.
  vconn: Better bundle error management.
  ofproto-dpif: Always forward 'used' from the old_rule.
  meta-flow: Add byte access to struct mf_value.
  meta-flow: Add mf_mask_field_masked().
  meta-flow: Clean up masking with prerequisities checking.
  ofproto-dpif-xlate: Hash only fields specified for 'hash' selection
    method.
  ofp-util: Do not free() field that is not allocated.
  ofproto: Use ofputil_uninit_group_mod().
  meta-flow: Compact struct field_array.
  ofproto: Support group mods in bundles.
  ofp-util: remove flow mod's delete_reason.
  ofproto: Reduce dependency on ofputil_flow_mod after rule has been
    created.
  ofproto: Add 'modify_cookie' to ofproto_flow_mod.
  ofproto: Add 'command' to ofproto_flow_mod.
  ofproto: Reduce bundle memory use.

 NEWS                              |    7 +-
 include/openvswitch/meta-flow.h   |   21 +-
 include/openvswitch/ofp-actions.h |   40 +
 include/openvswitch/ofp-parse.h   |   14 +-
 include/openvswitch/ofp-util.h    |   22 +-
 include/openvswitch/vconn.h       |   12 +-
 lib/automake.mk                   |    1 +
 lib/classifier-private.h          |   31 +-
 lib/classifier.c                  |   47 +-
 lib/classifier.h                  |   29 +-
 lib/dpctl.c                       |    4 +-
 lib/flow.h                        |   45 +
 lib/learn.c                       |    1 -
 lib/meta-flow.c                   |  178 ++--
 lib/nx-match.c                    |   58 +-
 lib/ofp-actions.c                 |    2 +-
 lib/ofp-parse.c                   |  192 ++++-
 lib/ofp-print.c                   |    4 +-
 lib/ofp-util.c                    |   57 +-
 lib/ovs-router.c                  |    6 +-
 lib/tnl-ports.c                   |    8 +-
 lib/vconn.c                       |  133 ++-
 lib/versions.h                    |   74 ++
 ofproto/bundles.c                 |    2 +-
 ofproto/bundles.h                 |   12 +-
 ofproto/ofproto-dpif-xlate.c      |  132 ++-
 ofproto/ofproto-dpif.c            |  111 +--
 ofproto/ofproto-dpif.h            |   12 +-
 ofproto/ofproto-provider.h        |  229 ++++-
 ofproto/ofproto.c                 | 1723 +++++++++++++++++++++++--------------
 ovn/controller/ofctrl.c           |    6 +-
 tests/ofproto-dpif.at             |    2 +-
 tests/ofproto-macros.at           |    2 +
 tests/ofproto.at                  |  468 +++++++++-
 tests/ovs-ofctl.at                |    4 +
 tests/test-classifier.c           |   46 +-
 tests/test-odp.c                  |    2 +-
 tests/test-ovn.c                  |    4 +-
 utilities/ovs-ofctl.8.in          |   56 +-
 utilities/ovs-ofctl.c             |  160 +++-
 40 files changed, 2727 insertions(+), 1230 deletions(-)
 create mode 100644 lib/versions.h

-- 
2.1.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to