ovn-controller: Persist ovn flow tables
[cascardo/ovs.git] / ovn / controller / ofctrl.h
index bf5dfd5..49b95b0 100644 (file)
@@ -20,6 +20,7 @@
 #include <stdint.h>
 
 #include "openvswitch/meta-flow.h"
+#include "ovsdb-idl.h"
 
 struct controller_ctx;
 struct hmap;
@@ -31,12 +32,25 @@ struct group_table;
 /* Interface for OVN main loop. */
 void ofctrl_init(void);
 enum mf_field_id ofctrl_run(const struct ovsrec_bridge *br_int);
-void ofctrl_put(struct hmap *flows, struct group_table *group_table);
+void ofctrl_put(struct group_table *group_table);
 void ofctrl_wait(void);
 void ofctrl_destroy(void);
 
-/* Flow table interface to the rest of ovn-controller. */
-void ofctrl_add_flow(struct hmap *flows, uint8_t table_id, uint16_t priority,
-                     const struct match *, const struct ofpbuf *ofpacts);
+struct ovn_flow *ofctrl_dup_flow(struct ovn_flow *source);
+
+/* Flow table interfaces to the rest of ovn-controller. */
+void ofctrl_add_flow(uint8_t table_id, uint16_t priority,
+                     const struct match *, const struct ofpbuf *ofpacts,
+                     const struct uuid *uuid);
+
+void ofctrl_remove_flows(const struct uuid *uuid);
+
+void ofctrl_set_flow(uint8_t table_id, uint16_t priority,
+                     const struct match *, const struct ofpbuf *ofpacts,
+                     const struct uuid *uuid);
+
+void ofctrl_flow_table_clear(void);
+
+void ovn_flow_table_clear(void);
 
 #endif /* ovn/ofctrl.h */