dect
/
libnl
Archived
13
0
Fork 0

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>
This commit is contained in:
Thomas Graf 2013-05-08 13:52:27 +02:00
parent 8983fa9914
commit 807fddc4cd
1 changed files with 1 additions and 1 deletions

View File

@ -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);