ofp-util: Fix inconsistencies in table features type.
[sliver-openvswitch.git] / ofproto / ofproto-dpif.h
index 5da0b5d..06fde3f 100644 (file)
@@ -34,6 +34,15 @@ struct dpif_backer;
 struct OVS_LOCKABLE rule_dpif;
 struct OVS_LOCKABLE group_dpif;
 
+enum rule_dpif_lookup_verdict {
+    RULE_DPIF_LOOKUP_VERDICT_MATCH,         /* A match occurred. */
+    RULE_DPIF_LOOKUP_VERDICT_CONTROLLER,    /* A miss occurred and the packet
+                                             * should be passed to
+                                             * the controller. */
+    RULE_DPIF_LOOKUP_VERDICT_DROP,          /* A miss occurred and the packet
+                                             * should be dropped. */
+};
+
 /* For lock annotation below only. */
 extern struct ovs_rwlock xlate_rwlock;
 
@@ -65,12 +74,17 @@ extern struct ovs_rwlock xlate_rwlock;
  *   Ofproto-dpif-xlate is responsible for translating translating OpenFlow
  *   actions into datapath actions. */
 
-void rule_dpif_lookup(struct ofproto_dpif *, const struct flow *,
-                      struct flow_wildcards *, struct rule_dpif **rule);
+size_t ofproto_dpif_get_max_mpls_depth(const struct ofproto_dpif *);
+
+uint8_t rule_dpif_lookup(struct ofproto_dpif *, const struct flow *,
+                         struct flow_wildcards *, struct rule_dpif **rule);
 
-bool rule_dpif_lookup_in_table(struct ofproto_dpif *, const struct flow *,
-                               struct flow_wildcards *, uint8_t table_id,
-                               struct rule_dpif **rule);
+enum rule_dpif_lookup_verdict rule_dpif_lookup_from_table(struct ofproto_dpif *,
+                                                          const struct flow *,
+                                                          struct flow_wildcards *,
+                                                          bool force_controller_on_miss,
+                                                          uint8_t *table_id,
+                                                          struct rule_dpif **rule);
 
 void rule_dpif_ref(struct rule_dpif *);
 void rule_dpif_unref(struct rule_dpif *);
@@ -80,6 +94,7 @@ void rule_dpif_credit_stats(struct rule_dpif *rule ,
 
 bool rule_dpif_is_fail_open(const struct rule_dpif *);
 bool rule_dpif_is_table_miss(const struct rule_dpif *);
+bool rule_dpif_is_internal(const struct rule_dpif *);
 
 struct rule_actions *rule_dpif_get_actions(const struct rule_dpif *);