Add the ability to connect to a vconn asynchronously.
authorBen Pfaff <blp@nicira.com>
Thu, 27 Mar 2008 22:16:19 +0000 (15:16 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 28 Mar 2008 00:50:33 +0000 (17:50 -0700)
commita9111b60153ba0a726a1711f2b7969d2691fbb0f
treebd3e26949f0afd8fd156bd84aa49f694d9d80217
parent5f9a684de51d748362b7685c3da9a4c961612103
Add the ability to connect to a vconn asynchronously.

Until now, vconn_connect() has always completed the connection
synchronously, blocking as necessary.  In the userspace
switch, we want to be able to continue forwarding packets even
if the connection to the controller drops.  Thus, this change set
that makes that possible.

The approach taken is perhaps more ambitious than needed, as it
actually adds a new high-level mechanism for polling on arbitrary
file descriptors.  This necessitates quite a bit of change to
each of the userspace programs that use vconns, but it also has
the effect of simplifying them.  The new structure of these programs
is a lot less fragile than the old one (which tended to end up
livelocking or hanging when something wasn't quite right), so it
seems like the changes are worth it.
17 files changed:
controller/controller.c
include/Makefile.am
include/poll-loop.h [new file with mode: 0644]
include/socket-util.h
include/vconn.h
include/vlog-socket.h
include/vlog.h
lib/Makefile.am
lib/poll-loop.c [new file with mode: 0644]
lib/socket-util.c
lib/vconn-netlink.c
lib/vconn-ssl.c
lib/vconn-tcp.c
lib/vconn.c
lib/vlog-socket.c
secchan/secchan.c
utilities/dpctl.c