X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=vswitchd%2Fovs-vswitchd.c;h=e2473dcfe958c2cdcf39fed18e48e85556fac4af;hb=aae51f53358dc7946f7f09a88b1e0dd40306a99a;hp=5c8c80a51c089fbc72135a0dacc994031807a78f;hpb=4ea21243f5a6002528d33d2bd58ce41a9d03a4c4;p=openvswitch diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c index 5c8c80a5..e2473dcf 100644 --- a/vswitchd/ovs-vswitchd.c +++ b/vswitchd/ovs-vswitchd.c @@ -60,9 +60,8 @@ main(int argc, char *argv[]) { struct unixctl_server *unixctl; struct signal *sighup; - struct ovsdb_idl *idl; const char *remote; - bool inited, exiting; + bool exiting; int retval; proctitle_init(argc, argv); @@ -86,47 +85,19 @@ main(int argc, char *argv[]) daemonize_complete(); - idl = ovsdb_idl_create(remote, &ovsrec_idl_class); - - inited = false; + bridge_init(remote); exiting = false; while (!exiting) { - bool need_reconfigure; - if (signal_poll(sighup)) { vlog_reopen_log_file(); } - - need_reconfigure = false; - if (inited && bridge_run()) { - need_reconfigure = true; - } - if (ovsdb_idl_run(idl)) { - need_reconfigure = true; - } - - if (need_reconfigure) { - const struct ovsrec_open_vswitch *cfg; - - cfg = ovsrec_open_vswitch_first(idl); - if (cfg) { - if (inited) { - bridge_reconfigure(cfg); - } else { - bridge_init(cfg); - inited = true; - } - } - } + bridge_run(); unixctl_server_run(unixctl); dp_run(); netdev_run(); signal_wait(sighup); - if (inited) { - bridge_wait(); - } - ovsdb_idl_wait(idl); + bridge_wait(); unixctl_server_wait(unixctl); dp_wait(); netdev_wait();