summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2009-10-28 16:05:57 -0700
committerJesse Gross <jesse@nicira.com>2009-11-02 11:45:36 -0800
commit0c0afbecaace0509d7b2e5b7dee4b4eac7b31e19 (patch)
tree9a0a600c6af0ddabc3f7fd376d742758d8d7b83e
parentd99e262b28c34442045e53df746937432853809c (diff)
downloadopenvswitch-0c0afbecaace0509d7b2e5b7dee4b4eac7b31e19.tar.gz
ofproto: Only zero stats for non exact-match sub-rules.
We zero the stats on sub-rules after they expire to prevent them from being counted twice in their super-rule if they are reinstalled. However, for exact-match sub-rules this means that the OpenFlow stats are always zero. This changes that to only zero the stats for non exact match rules. Bug #1911
-rw-r--r--secchan/ofproto.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/secchan/ofproto.c b/secchan/ofproto.c
index 7fb0c646f..4266cbf71 100644
--- a/secchan/ofproto.c
+++ b/secchan/ofproto.c
@@ -1731,15 +1731,15 @@ rule_post_uninstall(struct ofproto *ofproto, struct rule *rule)
if (rule->packet_count) {
super->ip_tos = rule->ip_tos;
}
- }
- /* Reset counters to prevent double counting if the rule ever gets
- * reinstalled. */
- rule->packet_count = 0;
- rule->byte_count = 0;
- rule->accounted_bytes = 0;
- rule->tcp_flags = 0;
- rule->ip_tos = 0;
+ /* Reset counters to prevent double counting if the rule ever gets
+ * reinstalled. */
+ rule->packet_count = 0;
+ rule->byte_count = 0;
+ rule->accounted_bytes = 0;
+ rule->tcp_flags = 0;
+ rule->ip_tos = 0;
+ }
}
static void