]> git.proxmox.com Git - mirror_iproute2.git/commit
lib/libnetlink: ensure a minimum of 32KB for the buffer used in rtnl_recvmsg()
authorEric Dumazet <edumazet@google.com>
Wed, 13 Feb 2019 01:58:41 +0000 (17:58 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 13 Feb 2019 21:51:44 +0000 (13:51 -0800)
commitbb5ae621d0c7b9caf3a101903783bd5a1c997fa4
treef1d75b3653607ff9fafa3b5f2c7b7a91fd93783c
parent9e46c5c2063f2f8aa775d4fa17de3a82daeea47d
lib/libnetlink: ensure a minimum of 32KB for the buffer used in rtnl_recvmsg()

In the past, we tried to increase the buffer size up to 32 KB in order
to reduce number of syscalls per dump.

Commit 2d34851cd341 ("lib/libnetlink: re malloc buff if size is not enough")
brought the size back to 4KB because the kernel can not know the application
is ready to receive bigger requests.

See kernel commits 9063e21fb026 ("netlink: autosize skb lengthes") and
d35c99ff77ec ("netlink: do not enter direct reclaim from netlink_dump()")
for more details.

Fixes: 2d34851cd341 ("lib/libnetlink: re malloc buff if size is not enough")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Hangbin Liu <liuhangbin@gmail.com>
Cc: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
lib/libnetlink.c