[ovs-dev] [PATCH 1/5] netlink: Expose method to get Netlink pid of a socket.

Jesse Gross jesse at nicira.com
Thu Sep 22 06:02:03 UTC 2011


On Wed, Sep 21, 2011 at 9:37 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Mon, Sep 19, 2011 at 03:00:04PM -0700, Jesse Gross wrote:
>> In the future, the kernel will use unicast messages instead of
>> multicast to send upcalls.  As a result, we need to be able to
>> tell it where to direct the traffic.  This adds a function to expose
>> the Netlink pid of a socket so it can be included in messages to the
>> kernel.
>
> The Netlink socket library in OVS has logic to keep fds used for Netlink
> dump operations separate from fds used for multicast reception, because
> we don't want reading dump output to discard an arbitrary number of
> possibly interleaved multicast messages.
>
> Even though it's not technically multicast, this new way of receiving
> upcalls is still asynchronous and could still have the same issue as a
> socket subscribed to a multicast group.

That's a good point although you'll also have similar issues if you
execute transactions on the same socket so it's still necessary to
segregate operations on a single socket (as is done here).  We could
try to deal with that too although I'm not sure it's worth it and all
these games with swapping FDs behind the scenes makes me somewhat
nervous.



More information about the dev mailing list