ofproto-dpif: Differentiate between different miss types in packet in
[sliver-openvswitch.git] / ofproto / ofproto-dpif.c
index cb30142..8ce439d 100644 (file)
@@ -3034,6 +3034,12 @@ rule_dpif_is_table_miss(const struct rule_dpif *rule)
     return rule_is_table_miss(&rule->up);
 }
 
+bool
+rule_dpif_is_internal(const struct rule_dpif *rule)
+{
+    return rule_is_internal(&rule->up);
+}
+
 ovs_be64
 rule_dpif_get_flow_cookie(const struct rule_dpif *rule)
     OVS_REQUIRES(rule->up.mutex)
@@ -4332,6 +4338,14 @@ ofproto_dpif_unixctl_init(void)
     unixctl_command_register("dpif/dump-flows", "[-m] bridge", 1, 2,
                              ofproto_unixctl_dpif_dump_flows, NULL);
 }
+
+
+/* Returns true if 'rule' is an internal rule, false otherwise. */
+bool
+rule_is_internal(const struct rule *rule)
+{
+    return rule->table_id == TBL_INTERNAL;
+}
 \f
 /* Linux VLAN device support (e.g. "eth0.10" for VLAN 10.)
  *