netdev: Make netdev_get_vlan_vid() take a netdev instead of a name.
[openvswitch] / vswitchd / ovs-vswitchd.c
index 01a0e7edf2d03e50cc37b205715278f39c1dc9c2..3ee29c77194659936479cd0167e42248db60f0e6 100644 (file)
 #include "command-line.h"
 #include "compiler.h"
 #include "daemon.h"
+#include "dpif.h"
 #include "fault.h"
 #include "leak-checker.h"
 #include "mgmt.h"
 #include "ovs-vswitchd.h"
 #include "poll-loop.h"
-#include "port.h"
 #include "proc-net-compat.h"
 #include "process.h"
 #include "signals.h"
@@ -83,7 +83,6 @@ main(int argc, char *argv[])
     cfg_read();
     mgmt_init();
     bridge_init();
-    port_init();
     mgmt_reconfigure();
 
     need_reconfigure = false;
@@ -93,11 +92,14 @@ main(int argc, char *argv[])
             vlog_reopen_log_file();
             reconfigure();
         }
-        mgmt_run();
+        if (mgmt_run()) {
+            need_reconfigure = true;
+        }
         if (bridge_run()) {
             need_reconfigure = true;
         }
         unixctl_server_run(unixctl);
+        dp_run();
 
         if (need_reconfigure) {
             poll_immediate_wake();
@@ -106,6 +108,7 @@ main(int argc, char *argv[])
         mgmt_wait();
         bridge_wait();
         unixctl_server_wait(unixctl);
+        dp_wait();
         poll_block();
     }
 
@@ -128,7 +131,6 @@ reconfigure(void)
     cfg_read();
     bridge_reconfigure();
     mgmt_reconfigure();
-    port_reconfigure();
 
     for (i = 0; i < n_conns; i++) {
         unixctl_command_reply(conns[i], 202, NULL);
@@ -228,7 +230,7 @@ parse_options(int argc, char *argv[])
 static void
 usage(void)
 {
-    printf("%s: virtual switch daemon\n"
+    printf("%s: Open vSwitch daemon\n"
            "usage: %s [OPTIONS] CONFIG\n"
            "CONFIG is a configuration file in ovs-vswitchd.conf(5) format.\n",
            program_name, program_name);