diff options
author | Thomas Graf <tgraf@suug.ch> | 2013-05-08 11:52:27 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2013-05-08 11:52:27 (GMT) |
commit | 807fddc4cd9ecb12ba64e1b7fa26d86b6c2f19b0 (patch) | |
tree | f92ee7f5ca471da88c302d5e2700560de7a8da89 | |
parent | 8983fa99140297aa4a57b11b0222cf26c135bd00 (diff) | |
download | libnl-807fddc4cd9ecb12ba64e1b7fa26d86b6c2f19b0.zip libnl-807fddc4cd9ecb12ba64e1b7fa26d86b6c2f19b0.tar.gz libnl-807fddc4cd9ecb12ba64e1b7fa26d86b6c2f19b0.tar.bz2 |
nl: Increase receive buffer size to 4 pages
Assuming that the kernel does not send more than a page is no longer valid,
and enabling MSG_PEEK'ing by default to figure out the exact message buffer
requirements can have a negative influence on the performance of existing
applications. Bumping the default receive buffer space to 4 pages seems
a sane default.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
-rw-r--r-- | lib/nl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -597,7 +597,7 @@ int nl_recv(struct nl_sock *sk, struct sockaddr_nl *nla, flags |= MSG_PEEK | MSG_TRUNC; if (page_size == 0) - page_size = getpagesize(); + page_size = getpagesize() * 4; iov.iov_len = sk->s_bufsize ? : page_size; iov.iov_base = malloc(iov.iov_len); |