-/* Copyright (c) 2008, 2009 Nicira Networks
+/* Copyright (c) 2008, 2009, 2010 Nicira Networks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "fault.h"
#include "leak-checker.h"
#include "mgmt.h"
+#include "netdev.h"
#include "ovs-vswitchd.h"
#include "poll-loop.h"
-#include "port.h"
#include "proc-net-compat.h"
#include "process.h"
#include "signals.h"
}
unixctl_command_register("vswitchd/reload", reload);
- cfg_read();
+ retval = cfg_read();
+ if (retval) {
+ ovs_fatal(retval, "could not read config file");
+ }
mgmt_init();
bridge_init();
- port_init();
mgmt_reconfigure();
need_reconfigure = false;
}
unixctl_server_run(unixctl);
dp_run();
+ netdev_run();
if (need_reconfigure) {
poll_immediate_wake();
bridge_wait();
unixctl_server_wait(unixctl);
dp_wait();
+ netdev_wait();
poll_block();
}
}
static void
-reload(struct unixctl_conn *conn, const char *args UNUSED)
+reload(struct unixctl_conn *conn, const char *args OVS_UNUSED)
{
need_reconfigure = true;
conns = xrealloc(conns, sizeof *conns * (n_conns + 1));
cfg_read();
bridge_reconfigure();
mgmt_reconfigure();
- port_reconfigure();
for (i = 0; i < n_conns; i++) {
unixctl_command_reply(conns[i], 202, NULL);
"use --help for usage");
}
+ cfg_init();
config_file = argv[0];
error = cfg_set_file(config_file);
if (error) {