• Eric Dumazet's avatar
    netlink: autosize skb lengthes · 9063e21f
    Eric Dumazet authored
    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: default avatarEric Dumazet <edumazet@google.com>
    Cc: Thomas Graf <tgraf@suug.ch>
    Acked-by: default avatarThomas Graf <tgraf@suug.ch>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9063e21f
af_netlink.c 71 KB