git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Catalli's threaded switch
[sliver-openvswitch.git]
/
utilities
/
ovs-openflowd.c
diff --git
a/utilities/ovs-openflowd.c
b/utilities/ovs-openflowd.c
index
8cb50e4
..
5d780e1
100644
(file)
--- a/
utilities/ovs-openflowd.c
+++ b/
utilities/ovs-openflowd.c
@@
-152,18
+152,30
@@
main(int argc, char *argv[])
daemonize_complete();
daemonize_complete();
+#ifdef THREADED
+ /* Data thread started */
+ fprintf(stdout, "THREADED version running!\n");
+ dp_start();
+#endif
+
+ /* The following loop polls on protocol messages
+ * and on messages related to topology changes */
while (ofproto_is_alive(ofproto)) {
error = ofproto_run(ofproto);
if (error) {
ovs_fatal(error, "unrecoverable datapath error");
}
unixctl_server_run(unixctl);
while (ofproto_is_alive(ofproto)) {
error = ofproto_run(ofproto);
if (error) {
ovs_fatal(error, "unrecoverable datapath error");
}
unixctl_server_run(unixctl);
+#ifndef THREADED
dp_run();
dp_run();
+#endif
netdev_run();
ofproto_wait(ofproto);
unixctl_server_wait(unixctl);
netdev_run();
ofproto_wait(ofproto);
unixctl_server_wait(unixctl);
+#ifndef THREADED
dp_wait();
dp_wait();
+#endif
netdev_wait();
poll_block();
}
netdev_wait();
poll_block();
}