projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add extern "C" to more header files.
[openvswitch]
/
vswitchd
/
ovs-vswitchd.c
diff --git
a/vswitchd/ovs-vswitchd.c
b/vswitchd/ovs-vswitchd.c
index e95ee0aae57a3703abaa599ab31b344a4c5fc3d1..d98af469dc894ee4eb98077beb9a9add3c5fc62c 100644
(file)
--- a/
vswitchd/ovs-vswitchd.c
+++ b/
vswitchd/ovs-vswitchd.c
@@
-1,4
+1,4
@@
-/* 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-28,12
+28,13
@@
#include "command-line.h"
#include "compiler.h"
#include "daemon.h"
#include "command-line.h"
#include "compiler.h"
#include "daemon.h"
+#include "dpif.h"
#include "fault.h"
#include "leak-checker.h"
#include "mgmt.h"
#include "fault.h"
#include "leak-checker.h"
#include "mgmt.h"
+#include "netdev.h"
#include "ovs-vswitchd.h"
#include "poll-loop.h"
#include "ovs-vswitchd.h"
#include "poll-loop.h"
-#include "port.h"
#include "proc-net-compat.h"
#include "process.h"
#include "signals.h"
#include "proc-net-compat.h"
#include "process.h"
#include "signals.h"
@@
-80,10
+81,12
@@
main(int argc, char *argv[])
}
unixctl_command_register("vswitchd/reload", reload);
}
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();
mgmt_init();
bridge_init();
- port_init();
mgmt_reconfigure();
need_reconfigure = false;
mgmt_reconfigure();
need_reconfigure = false;
@@
-100,6
+103,8
@@
main(int argc, char *argv[])
need_reconfigure = true;
}
unixctl_server_run(unixctl);
need_reconfigure = true;
}
unixctl_server_run(unixctl);
+ dp_run();
+ netdev_run();
if (need_reconfigure) {
poll_immediate_wake();
if (need_reconfigure) {
poll_immediate_wake();
@@
-108,6
+113,8
@@
main(int argc, char *argv[])
mgmt_wait();
bridge_wait();
unixctl_server_wait(unixctl);
mgmt_wait();
bridge_wait();
unixctl_server_wait(unixctl);
+ dp_wait();
+ netdev_wait();
poll_block();
}
poll_block();
}
@@
-115,7
+122,7
@@
main(int argc, char *argv[])
}
static void
}
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));
{
need_reconfigure = true;
conns = xrealloc(conns, sizeof *conns * (n_conns + 1));
@@
-130,7
+137,6
@@
reconfigure(void)
cfg_read();
bridge_reconfigure();
mgmt_reconfigure();
cfg_read();
bridge_reconfigure();
mgmt_reconfigure();
- port_reconfigure();
for (i = 0; i < n_conns; i++) {
unixctl_command_reply(conns[i], 202, NULL);
for (i = 0; i < n_conns; i++) {
unixctl_command_reply(conns[i], 202, NULL);
@@
-219,6
+225,7
@@
parse_options(int argc, char *argv[])
"use --help for usage");
}
"use --help for usage");
}
+ cfg_init();
config_file = argv[0];
error = cfg_set_file(config_file);
if (error) {
config_file = argv[0];
error = cfg_set_file(config_file);
if (error) {