netlink-socket: Do not make flow_dump block on netlink socket.
authorAlex Wang <alexw@nicira.com>
Fri, 18 Jul 2014 21:27:36 +0000 (14:27 -0700)
committerAlex Wang <alexw@nicira.com>
Sat, 19 Jul 2014 00:30:17 +0000 (17:30 -0700)
commit1738803acda21425c19d1549c0c1e6586ef0c64a
treea3aa53bec71f1c4ec53721c06175356aca87573d
parent6a92c6f079f7f19c6a46d167af16ff600d3023d0
netlink-socket: Do not make flow_dump block on netlink socket.

Commit 93295354 (netlink-socket: Simplify multithreaded dumping
to match Linux reality.) makes the call to recvmsg() block if no
messages are available.  This can cause revalidator threads hanging
for long time or even deadlock when main thread tries to stop the
revalidator threads.

This commit fixes the issue by enabling the MSG_DONTWAIT flag in
the call to recvmsg().

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/netlink-socket.c