#include "util.h"
#include "ovs-thread.h"
+/* Priority for internal rules created to handle recirculation */
+#define RECIRC_RULE_PRIORITY 20
+
union user_action_cookie;
struct dpif_flow_stats;
struct ofproto;
* dropped. */
};
-/* For lock annotation below only. */
-extern struct ovs_rwlock xlate_rwlock;
/* Ofproto-dpif -- DPIF based ofproto implementation.
*
bool table_is_internal(uint8_t table_id);
const struct rule_actions *rule_dpif_get_actions(const struct rule_dpif *);
+uint32_t rule_dpif_get_recirc_id(struct rule_dpif *);
+void rule_set_recirc_id(struct rule *, uint32_t id);
ovs_be64 rule_dpif_get_flow_cookie(const struct rule_dpif *rule);
ofp_port_t vsp_realdev_to_vlandev(const struct ofproto_dpif *,
ofp_port_t realdev_ofp_port,
ovs_be16 vlan_tci);
-bool vsp_adjust_flow(const struct ofproto_dpif *, struct flow *);
+bool vsp_adjust_flow(const struct ofproto_dpif *, struct flow *,
+ struct ofpbuf *packet);
int ofproto_dpif_execute_actions(struct ofproto_dpif *, const struct flow *,
struct rule_dpif *, const struct ofpact *,
- size_t ofpacts_len, struct ofpbuf *)
- OVS_EXCLUDED(xlate_rwlock);
+ size_t ofpacts_len, struct ofpbuf *);
void ofproto_dpif_send_packet_in(struct ofproto_dpif *,
struct ofproto_packet_in *);
bool ofproto_dpif_wants_packet_in_on_miss(struct ofproto_dpif *);
void ofproto_dpif_free_recirc_id(struct ofproto_dpif *ofproto, uint32_t recirc_id);
int ofproto_dpif_add_internal_flow(struct ofproto_dpif *,
const struct match *, int priority,
+ uint16_t idle_timeout,
const struct ofpbuf *ofpacts,
struct rule **rulep);
int ofproto_dpif_delete_internal_flow(struct ofproto_dpif *, struct match *,
}
}
+static inline bool rule_dpif_try_ref(struct rule_dpif *rule)
+{
+ if (rule) {
+ return ofproto_rule_try_ref(RULE_CAST(rule));
+ }
+ return false;
+}
+
+
static inline void rule_dpif_unref(struct rule_dpif *rule)
{
if (rule) {