[ovs-dev] [RFC 1/4] netlink: Support for memory mapped Netlink sockets

Ben Pfaff blp at nicira.com
Tue May 27 16:18:19 UTC 2014


On Sat, May 24, 2014 at 12:54:04PM +0100, Thomas Graf wrote:
> On 05/23/14 at 08:51am, Ben Pfaff wrote:
> > On Fri, May 23, 2014 at 09:03:54AM +0100, Thomas Graf wrote:
> > > > Using nl_sock_send_linear() can cause messages to be reordered.  Do we
> > > > need to wait for the tx ring to empty before calling it?
> > > 
> > > Are you referring to parallel usage of _send_linear() and
> > > _send_mmap() on the same socket? The ring does support carrying
> > > a do-a-linear-read event which allows parallel use while preserving
> > > order but the caller may not decide to do so on his own. Going from
> > > maped to unmapped on a live socket would be a nice feature but would
> > > require kernel support first.
> > 
> > If we have a series of back-to-back nl_sock_send_mmap() calls, and one
> > or a few of them are too big for the frame size, then nothing currently
> > assures that the kernel will receive them in the order sent.  I am not
> > sure that it matters, but that is what I was trying to point out.
> 
> OK, I understand now. Sending order for a single thread is guaranteed
> because both mmaped and unmapped messages are represented by sendmsg()
> syscalls (unlike in the receive scenario). The ring is checked for
> messages if a sendmsg() syscall is performed without payload on a
> socket with a ring setup.
> 
> I'll add this this to the nl_sock_send_mmap() function documentation.

That makes sense.  Thanks.



More information about the dev mailing list