X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=vswitchd%2Fovs-vswitchd.c;h=cd30c96d309762f96b4afb9c90bff079316181a7;hb=c97fb13280c565f55ed0de7cf0bf06ffe8320b70;hp=c307c9286b89e04db87abbe8b26cf5b55a377976;hpb=d98e60075528c3065ad453f7add4b30f22edcde3;p=openvswitch diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c index c307c928..cd30c96d 100644 --- a/vswitchd/ovs-vswitchd.c +++ b/vswitchd/ovs-vswitchd.c @@ -31,6 +31,7 @@ #include "compiler.h" #include "daemon.h" #include "dpif.h" +#include "dummy.h" #include "leak-checker.h" #include "netdev.h" #include "ovsdb-idl.h" @@ -40,6 +41,7 @@ #include "signals.h" #include "stream-ssl.h" #include "stream.h" +#include "stress.h" #include "svec.h" #include "timeval.h" #include "unixctl.h" @@ -66,6 +68,7 @@ main(int argc, char *argv[]) proctitle_init(argc, argv); set_program_name(argv[0]); + stress_init_command(); remote = parse_options(argc, argv); signal(SIGPIPE, SIG_IGN); sighup = signal_register(SIGHUP); @@ -99,8 +102,13 @@ main(int argc, char *argv[]) unixctl_server_wait(unixctl); dp_wait(); netdev_wait(); + if (exiting) { + poll_immediate_wake(); + } poll_block(); } + bridge_exit(); + unixctl_server_destroy(unixctl); return 0; } @@ -114,7 +122,8 @@ parse_options(int argc, char *argv[]) OPT_FAKE_PROC_NET, VLOG_OPTION_ENUMS, LEAK_CHECKER_OPTION_ENUMS, - OPT_BOOTSTRAP_CA_CERT + OPT_BOOTSTRAP_CA_CERT, + OPT_ENABLE_DUMMY }; static struct option long_options[] = { {"help", no_argument, 0, 'h'}, @@ -129,6 +138,7 @@ parse_options(int argc, char *argv[]) {"peer-ca-cert", required_argument, 0, OPT_PEER_CA_CERT}, {"bootstrap-ca-cert", required_argument, 0, OPT_BOOTSTRAP_CA_CERT}, #endif + {"enable-dummy", no_argument, 0, OPT_ENABLE_DUMMY}, {0, 0, 0, 0}, }; char *short_options = long_options_to_short_options(long_options); @@ -185,6 +195,10 @@ parse_options(int argc, char *argv[]) break; #endif + case OPT_ENABLE_DUMMY: + dummy_enable(); + break; + case '?': exit(EXIT_FAILURE);