Now it helps clients track the number of in-flight messages, but lets the
clients do the limiting themselves. This will come in handy for packet-in
rate limiting (in an upcoming commit), in which we want to track in-flight
packet-in messages separately from other in-flight messages.
We want to allow multiple OpenFlow connections to a switch, so that
dpctl and other management tools can also connect to a switch that
is connecte to the controller. These tools will want to fetch the
information in the data_hello message, but currently this can only
be done by sending a control_hello message, which changes the
switch configuration state. So breaking the hello messages up into
multiple different messages, only some of which affect configuration
state, cures the problem.
Also, clean up the kernel datapath a bit, by adding helper functions
for allocating and resizing Generic Netlink messages that encapsulate
OpenFlow messages.
As a consequence, this fixes tests for multicast and local Ethernet
addresses, which formerly tested for the high bits but should
have tested for the low bits of the first octet.
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.