diff options
author | Patrick McHardy <kaber@trash.net> | 2013-04-17 02:47:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-19 14:57:58 -0400 |
commit | f9c2288837ba072b21dba955f04a4c97eaa77b1e (patch) | |
tree | c02c28e33176fc82b8fd560b3a850351b28617e2 /include/linux/netlink.h | |
parent | 5fd96123ee19b96be7d7b57fd42227e1a146ef05 (diff) |
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>
Diffstat (limited to 'include/linux/netlink.h')
-rw-r--r-- | include/linux/netlink.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 07c473848dbd..6358da5eeee8 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -64,6 +64,8 @@ extern void __netlink_clear_multicast_users(struct sock *sk, unsigned int group) | |||
64 | extern void netlink_clear_multicast_users(struct sock *sk, unsigned int group); | 64 | extern void netlink_clear_multicast_users(struct sock *sk, unsigned int group); |
65 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); | 65 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); |
66 | extern int netlink_has_listeners(struct sock *sk, unsigned int group); | 66 | extern int netlink_has_listeners(struct sock *sk, unsigned int group); |
67 | extern struct sk_buff *netlink_alloc_skb(struct sock *ssk, unsigned int size, | ||
68 | u32 dst_portid, gfp_t gfp_mask); | ||
67 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 portid, int nonblock); | 69 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 portid, int nonblock); |
68 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 portid, | 70 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 portid, |
69 | __u32 group, gfp_t allocation); | 71 | __u32 group, gfp_t allocation); |