Subject: Re: Sending big Netlink messages to userspace

From: Patrick McHardy <[email-masked]>
Date: Thu, 26 Jun 2008 02:41:20 +0200

David Miller wrote:
> From: Thomas Graf <[email-masked]>
> Date: Wed, 25 Jun 2008 12:44:01 +0200
> 
>> libnl initializes the buffer size to the size of a page. The value
>> can be overwritten by calling nl_set_buffer_size(socket, rx, tx)
> 
> And it doesn't need to be any larger than a page.  Actually, the
> hard upper bound is 8K.
> 
> The kernel will always chop the response up into chunks of that
> size or smaller when generating replies to userspace.
> 
> Therefore userland need never have a buffer larger than 8K or
> sysconf(_SC_PAGESIZE), whichever is smaller.

For dumps the size is fine, for large unicast messages it
might need to be increased though (like nfnetlink_queue).