}
}
+static void
+rule_reinstall(struct ofproto *ofproto, struct rule *rule)
+{
+ if (rule->installed) {
+ struct odp_flow_put put;
+ do_put_flow(ofproto, rule, ODPPF_CREATE | ODPPF_MODIFY, &put);
+ } else {
+ rule_install(ofproto, rule, NULL);
+ }
+}
+
static void
rule_update_actions(struct ofproto *ofproto, struct rule *rule)
{
}
}
- /* Invariant: 'rule' is an exact-match rule. */
-
- /* XXX should forcibly install the rule here, since it's possible that it
- * got deleted externally (e.g. "dpctl dp-del-flows") and unless we
- * re-install it here we'll end up processing every packet by hand. But
- * the datapath doesn't provide a good interface for that. */
- rule_install(p, rule, NULL);
-
- /* Execute rule on packet. */
rule_execute(p, rule, &payload, &flow);
+ rule_reinstall(p, rule);
ofpbuf_delete(packet);
}
\f