Introduce ofpacts, an abstraction of OpenFlow actions.
authorBen Pfaff <blp@nicira.com>
Wed, 4 Jul 2012 05:17:14 +0000 (22:17 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 4 Jul 2012 05:21:11 +0000 (22:21 -0700)
commitf25d0cf3c366d92042269a4f787f19c741c2530c
tree82f6a2973471c4adfcd13cf2bbc8adf8c31b0aba
parent690a61c50a4744603be2ee3de8e22c97f9140d94
Introduce ofpacts, an abstraction of OpenFlow actions.

OpenFlow actions have always been somewhat awkward to handle.
Moreover, over time we've started creating actions that require more
complicated parsing.  When we maintain those actions internally in
their wire format, we end up parsing them multiple times, whenever
we have to look at the set of actions.

When we add support for OpenFlow 1.1 or later protocols, the situation
will get worse, because these newer protocols support many of the same
actions but with different representations.  It becomes unrealistic to
handle each protocol in its wire format.

This commit adopts a new strategy, by converting OpenFlow actions into
an internal form from the wire format when they are read, and converting
them back to the wire format when flows are dumped.  I believe that this
will be more maintainable over time.

Thanks to Simon Horman and Pravin Shelar for reviews.

Signed-off-by: Ben Pfaff <blp@nicira.com>
36 files changed:
DESIGN
NEWS
lib/automake.mk
lib/autopath.c
lib/autopath.h
lib/bundle.c
lib/bundle.h
lib/compiler.h
lib/learn.c
lib/learn.h
lib/learning-switch.c
lib/multipath.c
lib/multipath.h
lib/nx-match.c
lib/nx-match.h
lib/ofp-actions.c [new file with mode: 0644]
lib/ofp-actions.h [new file with mode: 0644]
lib/ofp-parse.c
lib/ofp-parse.h
lib/ofp-print.c
lib/ofp-print.h
lib/ofp-util.c
lib/ofp-util.h
ofproto/connmgr.c
ofproto/fail-open.c
ofproto/in-band.c
ofproto/ofproto-dpif.c
ofproto/ofproto-provider.h
ofproto/ofproto.c
tests/automake.mk
tests/learn.at
tests/ofp-actions.at [new file with mode: 0644]
tests/test-bundle.c
tests/test-multipath.c
tests/testsuite.at
utilities/ovs-ofctl.c