This series completes the implementation of OpenFlow 1.4 bundles for flow mods. Port mods are not yet supported.
OpenFlow 1.4 specifies support for 'bundles' which allow arbitrary collections of flow table modifications to be executed as a single transaction. Supporting this in OVS requres major refactoring of our 'ofproto' code implemenenting flow mods. Patches 1-3 are minor fixes. Patches 4-16 add the basic implementation of non-atomic bundles. This adds a behavioral change in the ofproto-provider interface, where rule_insert() may be called for a rule that is a duplicate of a rule that has already been inserted. Either the old or the new rule will be deleted shortly after the duplicate insertion, depending on the success of the whole transaction. Patches 17-19 add the implementation of atomic bundles, and also make ALL flow table modifications atomic to the threads performing classifier lookups. As different lookup threads may start executing at different tables versions, we must (briefly) keep multiple versions of flow table rules simultaneously visible to different lookup threads. This requires more substantial changes to the ofproto-provider interface. v2 changes: - Patch 16 adds a new '--bundle' option to ovs-ofctl, which makes all the flow mod commands (including 'replace-flows') to issue their modifications as a single bundle transaction. - Most of the bundle transaction code is moved to the vconn library, as it was not specific to ovs-ofctl, and it seems to be wholly complementary to the existing vconn functionality. - Added OpenFlow command traces to the unit tests to verify that bundles are actually used. - Bug fix in memory management in patch 19, which was previously hidden due to a memory leak in OVS master. Specifically, an 'ofproto' needs to be around a bit longer, as rule destruction is now doubly postponed, first for the rule removal from the classifier for the benefit of parallel lookups on the old version (new), and then for the rule destruction for the benefit of any RCU readers (old). Jarno Rajahalme (19): ofproto: Eliminate use of unset error code. ofp-parse: Remove unused F_OUT_PORT field flag. ofp-util: Fix xid in ofputil_encode_bundle_add(). classifier: Add support for invisible flows. classifier: Support duplicate rules. bundles: Validate bundled messages. bundles: Manage bundles in connmgr. ofproto: Factor out ofproto_rule_insert__(). ofproto: Factor out ofproto_rule_create(). ofproto: Use enum ofperr for 'error'. ofproto: Refactor modify_flows__(). ofproto: Split add_flow(). ofproto: Split modify_flows(). ofproto: Split delete_flow*(). ofproto: Add support for reverting flow mods, and bundle commit. ovs-ofctl: Add 'bundle' command and unit testing. classifier: Support table versioning ofproto: Infra for table versioning. Use classifier versioning. NEWS | 19 +- include/openvswitch/vconn.h | 3 + lib/classifier-private.h | 31 +- lib/classifier.c | 327 ++++++++---- lib/classifier.h | 13 +- lib/ofp-parse.c | 47 +- lib/ofp-parse.h | 6 +- lib/ofp-print.c | 4 +- lib/ofp-util.c | 44 +- lib/ofp-util.h | 9 +- 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 | 236 +++++++- ofproto/bundles.c | 176 ++---- ofproto/bundles.h | 72 ++- ofproto/connmgr.c | 51 +- ofproto/connmgr.h | 6 +- ofproto/ofproto-dpif-xlate.c | 17 +- ofproto/ofproto-dpif.c | 128 +++-- ofproto/ofproto-dpif.h | 5 +- ofproto/ofproto-provider.h | 65 +-- ofproto/ofproto.c | 1218 ++++++++++++++++++++++++++++++------------ tests/ofproto-macros.at | 10 + tests/ofproto.at | 310 +++++++++-- tests/ovs-ofctl.at | 107 ++++ tests/test-classifier.c | 13 +- utilities/ovs-ofctl.8.in | 68 ++- utilities/ovs-ofctl.c | 110 +++- 30 files changed, 2351 insertions(+), 763 deletions(-) -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev