diff options
author | Jarno Rajahalme <jrajahalme@nicira.com> | 2015-06-11 15:53:43 -0700 |
---|---|---|
committer | Jarno Rajahalme <jrajahalme@nicira.com> | 2015-06-11 15:53:43 -0700 |
commit | 39c9459355b6f010aa73ca80ad8d0e6893ef0a88 (patch) | |
tree | c6919ee142db73f19c2f807b6d1ab21fff5ed51a /ofproto/bundles.h | |
parent | 621b8064b7f8921576dcba1c4b292ba1f6644061 (diff) | |
download | openvswitch-39c9459355b6f010aa73ca80ad8d0e6893ef0a88.tar.gz |
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>
Diffstat (limited to 'ofproto/bundles.h')
-rw-r--r-- | ofproto/bundles.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ofproto/bundles.h b/ofproto/bundles.h index 778cba25a..0c7daf288 100644 --- a/ofproto/bundles.h +++ b/ofproto/bundles.h @@ -40,9 +40,8 @@ struct ofp_bundle_entry { }; /* Used during commit. */ - struct rule_collection rules; /* Affected rules. */ - struct rule *rule; - bool modify; + struct rule_collection old_rules; /* Affected rules. */ + struct rule_collection new_rules; /* Affected rules. */ /* OpenFlow header and some of the message contents for error reporting. */ struct ofp_header ofp_msg[DIV_ROUND_UP(64, sizeof(struct ofp_header))]; |