Re: [PATCH] Increase the size of the netlink recvmsg buffer

Quentin Armitage <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Organization The Armitage family
Message-ID <[email protected]>
On Sat, 2016-11-12 at 16:23 -0800, dwilder wrote:

> On systems with a large number of network interfaces keepalived may 
> report:
> "Netlink: error: message truncated messages"
> <and>
> "VRRP is trying to assign VIP to unknown qr-dc4f0313-ca interface !!! go 
> out
>   and fix your conf !!!"
> 
> This was reported on a system running OpenStack/Nutron.
> 
> I found that the netlink recvmsg buffer was too small causing messages 
> to be
> truncated. Increasing the buffer from 4K to 8K prevents the problem.
> (linux/netlink.h suggests using an 8K buffer).
> 
> I tested the fix by creating 100 veth interfaces and verifying the 
> errors
> did not return.
> 
> Signed-off-by: David Wilder <[email protected]>
> 
> ---
>   keepalived/vrrp/vrrp_netlink.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/keepalived/vrrp/vrrp_netlink.c 
> b/keepalived/vrrp/vrrp_netlink.c
> index d7adffa..7897b4c 100644
> --- a/keepalived/vrrp/vrrp_netlink.c
> +++ b/keepalived/vrrp/vrrp_netlink.c
> @@ -273,7 +273,7 @@ netlink_parse_info(int (*filter) (struct sockaddr_nl 
> *, struct nlmsghdr *),
>   	int error;
> 
>   	while (1) {
> -		char buf[4096];
> +		char buf[8192];
>   		struct iovec iov = { buf, sizeof buf };
>   		struct sockaddr_nl snl;
>   		struct msghdr msg =

Hi David,

I'm very happy to apply your patch, but since I have been unable to
reproduce the problem, it would be helpful if you could provide some
further information.

1. I haven't been able to see any reference in linux/netlink.h
suggesting an 8k buffer (or any other buffer size). Could you please let
me know where the reference is and/or send a copy of your
linux/netlink.h
2. Could you send a copy of the script you used to create the veth
interfaces, so that I can reproduce it here.
3. What version of Linux are you using?

With many thanks,
Quentin Armitage

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.