[ovs-dev] [PATCH] ofproto: Update time of super-rule to match sub-rule

Ben Pfaff blp at nicira.com
Sat Nov 14 04:28:04 UTC 2009


Justin Pettit <jpettit at nicira.com> writes:

> @@ -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) {
> +            rule->super->used = used;
> +        }
>          netflow_flow_update_time(ofproto->netflow, &rule->nf_flow, used);
>      }
>  }

Do you have reason to believe that whenever used > rule->used is
true, then used > rule->super->used is also true?  Without
inspecting code, it seems likely to me that it is not always
true, so that the added "if" statement should also verify that
used > rule->super->used.




More information about the dev mailing list