From: Justin Pettit Date: Sat, 14 Nov 2009 02:53:28 +0000 (-0800) Subject: ofproto: Update time of super-rule to match sub-rule X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4836f9f2bfa5dc0531bd1d828aae96ccd6b415cb;p=openvswitch ofproto: Update time of super-rule to match sub-rule Rules keep track of their creation and last used time. When a sub-rule is updated, it wasn't updating the time of its super-rule. This commit fixes that behavior. Thanks to Jesse Gross for the help tracking this down. --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index b49ea49f..2894e2d3 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -2733,6 +2733,9 @@ update_time(struct ofproto *ofproto, struct rule *rule, long long int used = msec_from_nsec(stats->used_sec, stats->used_nsec); if (used > rule->used) { rule->used = used; + if (rule->super && used > rule->super->used) { + rule->super->used = used; + } netflow_flow_update_time(ofproto->netflow, &rule->nf_flow, used); } }