hindex: Fix test expected output.

Signed-off-by: Ben Pfaff <blp@nicira.com>
tests: Fix theoretical races in "ofproto-dpif - controller" test.

I don't see anything that guaranteed that ovs-ofctl would receive and print
the packets before it exited.  This commit inserts explicit waits, to avoid
the problem.

Found by inspection.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-ofctl: Bug fix in flow_format()

Fix a corner case bug where ARP packet with ARP opcode value of 1 would cause
tp_src and tp_dst to appear in the output string.

This bug caused some output from flow_format() to not be accepted by
'ovs-appctl ofproto/trace'

Added test coverage by using ARP opcode 1 in one unit test case, that
would have exposed the bug.

Bug #18334

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
netlink-socket: Simplify use of transactions and dumps.

This disentangles "struct nl_dump" from "struct nl_sock", clearing the way
to make the use of either one thread-safe in an obviously correct manner.

Signed-off-by: Ben Pfaff <blp@nicira.com>
netlink-socket: Make thread-safe.

The uses of vlog in this module are not thread-safe, because vlog itself
is not yet thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
poll-loop: Simplify and speed up polling.

The simplification comes from dropping support for canceling a
poll_waiter, which was a feature that was never used.  The speedup
comes from avoiding a malloc() for every call to poll_fd_wait().
(I doubt that this significantly improves performance.)

This prepares for making the polling structures per-thread in
the next commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
poll-loop: Make poll loop data structures per-thread.

Signed-off-by: Ben Pfaff <blp@nicira.com>
system-stats: Move into separate thread.

Signed-off-by: Ben Pfaff <blp@nicira.com>
byteq: Make the queue size variable instead of fixed at BYTEQ_SIZE bytes.

Signed-off-by: Ben Pfaff <blp@nicira.com>
util: New macros ROUND_UP_POW2, ROUND_DOWN_POW2.

Signed-off-by: Ben Pfaff <blp@nicira.com>
async-append: New library to allow asynchronous appending to a log file.

This will be hooked into the vlog library in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
vlog: Use async I/O.

Signed-off-by: Ben Pfaff <blp@nicira.com>
vlog: Make VLOG_ONCE thread-safe.

Of course, the code it calls into isn't thread-safe itself yet.

Signed-off-by: Ben Pfaff <blp@nicira.com>
vlog: Make thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>