meta-flow: Correctly set destination MAC in mf_set_flow_value().
[sliver-openvswitch.git] / vswitchd / ovs-vswitchd.c
index 7d4e4d7..2a86972 100644 (file)
 #include "compiler.h"
 #include "daemon.h"
 #include "dirs.h"
+#include "dpif.h"
 #include "dummy.h"
 #include "leak-checker.h"
 #include "netdev.h"
+#include "openflow/openflow.h"
 #include "ovsdb-idl.h"
 #include "poll-loop.h"
 #include "process.h"
@@ -80,7 +82,7 @@ main(int argc, char *argv[])
     if (retval) {
         exit(EXIT_FAILURE);
     }
-    unixctl_command_register("exit", ovs_vswitchd_exit, &exiting);
+    unixctl_command_register("exit", "", 0, 0, ovs_vswitchd_exit, &exiting);
 
     bridge_init(remote);
     free(remote);
@@ -90,7 +92,9 @@ main(int argc, char *argv[])
         if (signal_poll(sighup)) {
             vlog_reopen_log_file();
         }
+        bridge_run_fast();
         bridge_run();
+        bridge_run_fast();
         unixctl_server_run(unixctl);
         netdev_run();
 
@@ -120,6 +124,7 @@ parse_options(int argc, char *argv[])
         LEAK_CHECKER_OPTION_ENUMS,
         OPT_BOOTSTRAP_CA_CERT,
         OPT_ENABLE_DUMMY,
+        OPT_DISABLE_SYSTEM,
         DAEMON_OPTION_ENUMS
     };
     static struct option long_options[] = {
@@ -133,6 +138,7 @@ parse_options(int argc, char *argv[])
         {"peer-ca-cert", required_argument, NULL, OPT_PEER_CA_CERT},
         {"bootstrap-ca-cert", required_argument, NULL, OPT_BOOTSTRAP_CA_CERT},
         {"enable-dummy", no_argument, NULL, OPT_ENABLE_DUMMY},
+        {"disable-system", no_argument, NULL, OPT_DISABLE_SYSTEM},
         {NULL, 0, NULL, 0},
     };
     char *short_options = long_options_to_short_options(long_options);
@@ -146,12 +152,11 @@ parse_options(int argc, char *argv[])
         }
 
         switch (c) {
-        case 'H':
         case 'h':
             usage();
 
         case 'V':
-            OVS_PRINT_VERSION(OFP_VERSION, OFP_VERSION);
+            ovs_print_version(OFP_VERSION, OFP_VERSION);
             exit(EXIT_SUCCESS);
 
         case OPT_MLOCKALL:
@@ -181,6 +186,10 @@ parse_options(int argc, char *argv[])
             dummy_enable();
             break;
 
+        case OPT_DISABLE_SYSTEM:
+            dp_blacklist_provider("system");
+            break;
+
         case '?':
             exit(EXIT_FAILURE);
 
@@ -225,8 +234,8 @@ usage(void)
 }
 
 static void
-ovs_vswitchd_exit(struct unixctl_conn *conn, const char *args OVS_UNUSED,
-                  void *exiting_)
+ovs_vswitchd_exit(struct unixctl_conn *conn, int argc OVS_UNUSED,
+                  const char *argv[] OVS_UNUSED, void *exiting_)
 {
     bool *exiting = exiting_;
     *exiting = true;