]> 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)
commita30e50c4ebdccd7ca60e841e35f585d5c73a1f3b
treec02c28e33176fc82b8fd560b3a850351b28617e2
parent2aaaceca61a8ba4bfac0b18c1549d592b7392a70
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