ovn-controller: Slightly adjust pipeline init and destroy for consistency.
authorBen Pfaff <blp@nicira.com>
Sun, 19 Jul 2015 17:33:26 +0000 (10:33 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 3 Aug 2015 17:16:44 +0000 (10:16 -0700)
This drops an unused parameter and groups the calls to these functions
with ofctrl_destroy() in each case.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
ovn/controller/ovn-controller.c
ovn/controller/pipeline.c
ovn/controller/pipeline.h

index 559cb0b..3976526 100644 (file)
@@ -239,6 +239,7 @@ main(int argc, char *argv[])
     sbrec_init();
 
     ofctrl_init();
+    pipeline_init();
 
     /* Connect to OVS OVSDB instance.  We do not monitor all tables by
      * default, so modules must register their interest explicitly.  */
@@ -250,8 +251,6 @@ main(int argc, char *argv[])
     binding_register_ovs_idl(ctx.ovs_idl);
     physical_register_ovs_idl(ctx.ovs_idl);
 
-    pipeline_init();
-
     get_initial_snapshot(ctx.ovs_idl);
 
     char *ovnsb_remote = get_ovnsb_remote(ctx.ovs_idl);
@@ -327,7 +326,7 @@ main(int argc, char *argv[])
     }
 
     unixctl_server_destroy(unixctl);
-    pipeline_destroy(&ctx);
+    pipeline_destroy();
     ofctrl_destroy();
 
     idl_loop_destroy(&ovs_idl_loop);
index 151b9d5..4c0ffd3 100644 (file)
@@ -357,7 +357,7 @@ pipeline_run(struct controller_ctx *ctx, struct hmap *flow_table)
 }
 
 void
-pipeline_destroy(struct controller_ctx *ctx OVS_UNUSED)
+pipeline_destroy(void)
 {
     expr_symtab_destroy(&symtab);
     ldp_destroy();
index 889fef9..7d33341 100644 (file)
@@ -43,7 +43,7 @@ struct uuid;
 
 void pipeline_init(void);
 void pipeline_run(struct controller_ctx *, struct hmap *flow_table);
-void pipeline_destroy(struct controller_ctx *);
+void pipeline_destroy(void);
 
 uint32_t ldp_to_integer(const struct uuid *logical_datapath);