On 16 July 2014 05:58, Ben Pfaff <b...@nicira.com> wrote: > Commit 0791315e4d (netlink-socket: Work around kernel Netlink dump thread > races.) introduced a simple workaround for Linux kernel races in Netlink > dumps. However, the code remained more complicated than needed. This > commit simplifies it. > > The main reason for complication in the code was 'status_seq' in nl_dump. > This member was there to allow a thread to wait for some other thread to > refill the socket buffer with another dump message (although we did not > understand the reason at the time it was introduced). Now that we know > that Netlink dumps properly need to be serialized to work in existing > Linux kernels, there's no additional value in having 'status_seq', > because serialized recvmsg() calls always refill the socket buffer > properly. > > This commit updates nl_msg_next() to clear its buffer argument on error. > This is a more convenient interface for the new version of the Netlink > dump code. nl_msg_next() doesn't have any other callers. > > Signed-off-by: Ben Pfaff <b...@nicira.com> >
Up to you whether the EAGAIN assumption is worth mentioning in the code (might not be, given the kernel behaviour is decoupled from this code). Acked-by: Joe Stringer <joestrin...@nicira.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev