summaryrefslogtreecommitdiff
path: root/ofproto/ofproto-provider.h
diff options
context:
space:
mode:
authorJarno Rajahalme <jarno@ovn.org>2016-07-29 16:52:03 -0700
committerJarno Rajahalme <jarno@ovn.org>2016-07-29 16:52:03 -0700
commit748eb2f5b1c92d902cab69be6b8df725b8ee06b3 (patch)
tree59406daa93533fd61d6b5f0eb440a8bf306dc7d7 /ofproto/ofproto-provider.h
parent506c1ddb3404c6bcc30eaf81570aae72f39fa782 (diff)
downloadopenvswitch-748eb2f5b1c92d902cab69be6b8df725b8ee06b3.tar.gz
ofproto-dpif: Always forward 'used' from the old_rule.
Use new rule's flags to determine whether stats should be forwarded from the old, modified rule to the new rule. This captures the fact that prior to OpenFlow 1.2, which defines the reset counts flag, the reset counts semantics was assumed by default. However, in that case the reset counts flag is only present in the new flow, not on the corresponding flow mod. Having the above fixed revealed that the 'used' timestamp was not forwarded from the old rule to the new rule when counts were not being forwarded. Fix this by always forwarding the 'used' timestamp. Fixes: 39c9459355 ("Use classifier versioning.") Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/ofproto-provider.h')
-rw-r--r--ofproto/ofproto-provider.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/ofproto/ofproto-provider.h b/ofproto/ofproto-provider.h
index 470f543b7..e87ba0f0f 100644
--- a/ofproto/ofproto-provider.h
+++ b/ofproto/ofproto-provider.h
@@ -1245,8 +1245,9 @@ struct ofproto_class {
* must add the new rule to the datapath flow table and return only after
* this is complete. The 'new_rule' may be a duplicate of an 'old_rule'.
* In this case the 'old_rule' is non-null, and the implementation should
- * forward rule statistics from the 'old_rule' to the 'new_rule' if
- * 'forward_stats' is 'true'. This may not fail.
+ * forward rule statistics counts from the 'old_rule' to the 'new_rule' if
+ * 'forward_counts' is 'true', 'used' timestamp is always forwarded. This
+ * may not fail.
*
*
* Deletion
@@ -1270,7 +1271,7 @@ struct ofproto_class {
enum ofperr (*rule_construct)(struct rule *rule)
/* OVS_REQUIRES(ofproto_mutex) */;
void (*rule_insert)(struct rule *rule, struct rule *old_rule,
- bool forward_stats)
+ bool forward_counts)
/* OVS_REQUIRES(ofproto_mutex) */;
void (*rule_delete)(struct rule *rule) /* OVS_REQUIRES(ofproto_mutex) */;
void (*rule_destruct)(struct rule *rule);