]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: implement memory mapped recvmsg()
authorPatrick McHardy <kaber@trash.net>
Wed, 17 Apr 2013 06:47:04 +0000 (06:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Apr 2013 18:57:58 +0000 (14:57 -0400)
commiteb78c3c0079d7ce8ceebfb7a1e52d9783fdb69dd
treec02c28e33176fc82b8fd560b3a850351b28617e2
parent9c3977ba7473277e7d36d6db98883bb65882bb88
netlink: implement memory mapped recvmsg()

Add support for mmap'ed recvmsg(). To allow the kernel to construct messages
into the mapped area, a dataless skb is allocated and the data pointer is
set to point into the ring frame. This means frames will be delivered to
userspace in order of allocation instead of order of transmission. This
usually doesn't matter since the order is either not determinable by
userspace or message creation/transmission is serialized. The only case
where this can have a visible difference is nfnetlink_queue. Userspace
can't assume mmap'ed messages have ordered IDs anymore and needs to check
this if using batched verdicts.

For non-mapped sockets, nothing changes.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netlink.h
net/netlink/af_netlink.c