Use classifier versioning.
authorJarno Rajahalme <jrajahalme@nicira.com>
Thu, 11 Jun 2015 22:53:43 +0000 (15:53 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Thu, 11 Jun 2015 22:53:43 +0000 (15:53 -0700)
commit39c9459355b6f010aa73ca80ad8d0e6893ef0a88
treec6919ee142db73f19c2f807b6d1ab21fff5ed51a
parent621b8064b7f8921576dcba1c4b292ba1f6644061
Use classifier versioning.

Each rule is now added or deleted in a specific tables version.  Flow
tables are versioned with a monotonically increasing 64-bit integer,
where positive values are valid version numbers.

Rule modifications are implemented as an insertion of a new rule and a
deletion of the old rule, both taking place in the same tables
version.  Since concurrent lookups may use different versions, both
the old and new rule must be available for lookups at the same time.

The ofproto provider interface is changed to accomodate the above.  As
rule's actions need not be modified any more, we no longer need
'rule_premodify_actions', nor 'rule_modify_actions'.  'rule_insert'
now takes a pointer to the old rule and adds a flag that tells whether
the old stats should be forwarded to the new rule or not (this
replaces the 'reset_counters' flag of the now removed
'rule_modify_actions').

Versioning all flow table changes has the side effect of making
learned flows visible for future lookups only.  I.e., the upcall that
executes the learn action, will not see the newly learned action in
it's classifier lookups.  Only upcalls that start executing after the
new flow was added will match on it.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
12 files changed:
NEWS
lib/classifier.c
lib/classifier.h
lib/ofp-actions.c
ofproto/bundles.h
ofproto/ofproto-dpif.c
ofproto/ofproto-provider.h
ofproto/ofproto.c
tests/ofproto.at
tests/ovs-ofctl.at
utilities/ovs-ofctl.8.in
utilities/ovs-ofctl.c