}
}
+static void
+uninstall_idle_flow(struct ofproto *ofproto, struct rule *rule)
+{
+ assert(rule->installed);
+ assert(!rule->cr.wc.wildcards);
+
+ rule_uninstall(ofproto, rule);
+ if (rule->super) {
+ classifier_remove(&ofproto->cls, &rule->cr);
+ rule_destroy(rule);
+ }
+}
+
static void
expire_rule(struct cls_rule *cls_rule, void *p_)
{
: LLONG_MAX);
expire = MIN(hard_expire, idle_expire);
if (expire == LLONG_MAX) {
+ if (rule->installed && time_msec() >= rule->used + 5000) {
+ uninstall_idle_flow(p, rule);
+ }
return;
}
now = time_msec();
if (now < expire) {
+ if (rule->installed && now >= rule->used + 5000) {
+ uninstall_idle_flow(p, rule);
+ }
return;
}