From: Jesse Gross Date: Thu, 12 Nov 2009 20:44:44 +0000 (-0800) Subject: ofproto: Correctly credit stats for displaced rules. X-Git-Tag: v0.90.7~6 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=14986b312eebf556c20e03b49fbff51859e38c5a;p=sliver-openvswitch.git ofproto: Correctly credit stats for displaced rules. When a rule displaces another, we are supposed to credit the stats for packets that have already been processed to the displaced rule before we eject it from the datapath. However, we were instead crediting the new rule. --- diff --git a/secchan/ofproto.c b/secchan/ofproto.c index cfaf0cf95..200633eb6 100644 --- a/secchan/ofproto.c +++ b/secchan/ofproto.c @@ -1625,7 +1625,7 @@ rule_install(struct ofproto *p, struct rule *rule, struct rule *displaced_rule) &put)) { rule->installed = true; if (displaced_rule) { - update_stats(p, rule, &put.flow.stats); + update_stats(p, displaced_rule, &put.flow.stats); rule_post_uninstall(p, displaced_rule); } }