From: Patrick McHardy <kaber@trash.net>
To: David Miller <davem@davemloft.net>
Cc: tgraf@suug.ch, juliusv@google.com, netdev@vger.kernel.org,
vbusam@google.com
Subject: Re: Sending big Netlink messages to userspace
Date: Thu, 26 Jun 2008 02:41:20 +0200 [thread overview]
Message-ID: <4862E5B0.9080007@trash.net> (raw)
In-Reply-To: <20080625.155146.103043993.davem@davemloft.net>
David Miller wrote:
> From: Thomas Graf <tgraf@suug.ch>
> 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).
next prev parent reply other threads:[~2008-06-26 0:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 16:38 Sending big Netlink messages to userspace Julius Volz
2008-06-24 17:00 ` Patrick McHardy
2008-06-24 18:18 ` Julius Volz
2008-06-25 10:44 ` Thomas Graf
2008-06-25 18:56 ` Julius Volz
2008-06-26 10:01 ` Thomas Graf
2008-06-25 22:51 ` David Miller
2008-06-26 0:41 ` Patrick McHardy [this message]
2008-06-26 15:39 ` Julius Volz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4862E5B0.9080007@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=juliusv@google.com \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
--cc=vbusam@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.