On Thu, Feb 27, 2014 at 02:13:06PM -0800, Joe Stringer wrote: > This patch modifies 'struct nl_dump' and nl_dump_next() to allow > multiple threads to share the same nl_dump. These changes are targeted > around synchronizing dump status between multiple callers, and > allowing callers to fully process their existing buffers before > determining whether to stop fetching flows. > > The 'status' field of 'struct nl_dump' becomes atomic, so that multiple > threads may check and/or update it to communicate when there is an error > or the netlink dump is finished. The low bit holds whether the final > message was seen, while the higher bits hold an errno value. > > nl_dump_next() will now read all messages from the given buffer before > checking the shared error status and attempting to fetch more. Multiple > threads may call this with the same nl_dump, but must provide > independent buffers. As previously, the final dump status can be > determined by calling nl_dump_done() from a single thread. > > Signed-off-by: Joe Stringer <joestrin...@nicira.com>
The comment on nl_dump_next() talks about flows, but really it should just talk about replies (since Netlink is used for many purposes). I'll fold that in. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev