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;
* 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 *);
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 *);