aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink/af_netlink.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2014-03-07 15:02:33 -0500
committerDavid S. Miller <davem@davemloft.net>2014-03-10 13:56:26 -0400
commit9063e21fb026c4966fc93261c18322214f9835eb (patch)
treec63b6774f68574b9197fb083af77029d9d4e52c6 /net/netlink/af_netlink.h
parentcd84ff4da1f46cbdc2d73366eabe9a8f818447cd (diff)
netlink: autosize skb lengthes
One known problem with netlink is the fact that NLMSG_GOODSIZE is really small on PAGE_SIZE==4096 architectures, and it is difficult to know in advance what buffer size is used by the application. This patch adds an automatic learning of the size. First netlink message will still be limited to ~4K, but if user used bigger buffers, then following messages will be able to use up to 16KB. This speedups dump() operations by a large factor and should be safe for legacy applications. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Thomas Graf <tgraf@suug.ch> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink/af_netlink.h')
-rw-r--r--net/netlink/af_netlink.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netlink/af_netlink.h b/net/netlink/af_netlink.h
index acbd774eeb7c..ed13a790b00e 100644
--- a/net/netlink/af_netlink.h
+++ b/net/netlink/af_netlink.h
@@ -31,6 +31,7 @@ struct netlink_sock {
31 u32 ngroups; 31 u32 ngroups;
32 unsigned long *groups; 32 unsigned long *groups;
33 unsigned long state; 33 unsigned long state;
34 size_t max_recvmsg_len;
34 wait_queue_head_t wait; 35 wait_queue_head_t wait;
35 bool cb_running; 36 bool cb_running;
36 struct netlink_callback cb; 37 struct netlink_callback cb;