netlink-socket: Async notifications are incompatible with other operations.
authorBen Pfaff <blp@nicira.com>
Thu, 22 Sep 2011 18:36:39 +0000 (11:36 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 22 Sep 2011 18:36:39 +0000 (11:36 -0700)
commita838c4fe1d5c4e39e52915e6c934c8dca36d17e6
tree16d7d811e92b637a83f4e14e93cbebe57deb3711
parent77b8ebcfd4f645f6de6dc438cb1d9f1ee4e88e0b
netlink-socket: Async notifications are incompatible with other operations.

A Netlink socket that receives asynchronous notifications (e.g. from a
multicast group) cannot be used for transactions or dumps, because those
operations would discard asynchronous messages that arrive while waiting
for replies.

This commit documents this issue in a comment on nl_sock_join_mcgroup().
It also removes an internal attempt to avoid mixing multicast reception
with other operations.  The attempt was incomplete, because it only
handled dumps even though ordinary transactions are also problematic.  It
seems better to remove it than to fix it because, first, all of the
existing users in OVS already separate multicast reception from other
operations and, second, an upcoming commit will start using unicast
Netlink for asynchronous notifications, which has the same issues but
doesn't use nl_sock_join_mcgroup().
lib/netlink-socket.c