{
struct ofproto *p = p_;
struct rule *rule = rule_from_cls_rule(cls_rule);
- long long int hard_expiration, idle_expiration, expiration, now;
-
- hard_expiration = (rule->hard_timeout
- ? rule->created + rule->hard_timeout * 1000
- : LLONG_MAX);
- idle_expiration = (rule->idle_timeout
- && (rule->super || list_is_empty(&rule->list))
- ? rule->used + rule->idle_timeout * 1000
- : LLONG_MAX);
- expiration = MIN(hard_expiration, idle_expiration);
-
- if (expiration == LLONG_MAX) {
+ long long int hard_expire, idle_expire, expire, now;
+
+ hard_expire = (rule->hard_timeout
+ ? rule->created + rule->hard_timeout * 1000
+ : LLONG_MAX);
+ idle_expire = (rule->idle_timeout
+ && (rule->super || list_is_empty(&rule->list))
+ ? rule->used + rule->idle_timeout * 1000
+ : LLONG_MAX);
+ expire = MIN(hard_expire, idle_expire);
+ if (expire == LLONG_MAX) {
return;
}
now = time_msec();
- if (now < expiration) {
+ if (now < expire) {
return;
}
}
send_flow_exp(p, rule, now,
- (now >= hard_expiration
+ (now >= hard_expire
? OFPER_HARD_TIMEOUT : OFPER_IDLE_TIMEOUT));
classifier_remove(&p->cls, &rule->cr);
rule_destroy(rule);