naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0120-libnetlink-Double-the-dump-buffer-size.patch

049c96
From 3cfb170def0cfa4b4048ee1e153b29b460ff54f1 Mon Sep 17 00:00:00 2001
049c96
From: Phil Sutter <psutter@redhat.com>
049c96
Date: Tue, 8 Mar 2016 18:35:16 +0100
049c96
Subject: [PATCH] libnetlink: Double the dump buffer size
049c96
049c96
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1304840
049c96
Upstream Status: iproute2.git commit 72b365e8e0fd5
049c96
049c96
commit 72b365e8e0fd5efe1d5c05d04c25950736635cfb
049c96
Author: Phil Sutter <phil@nwl.cc>
049c96
Date:   Fri Mar 4 19:57:28 2016 +0100
049c96
049c96
    libnetlink: Double the dump buffer size
049c96
049c96
    There have been reports about 'ip addr' printing "Message truncated" on
049c96
    systems with large numbers of VFs. Although I haven't been able to get
049c96
    my hands on hardware suitable to reproduce this, increasing the dump
049c96
    buffer has been reported to resolve the issue. For want of a better
049c96
    idea, just double the buffer size to 32k.
049c96
049c96
    Feels like this opportunistic buffer size selection is rather
049c96
    workarounding a design flaw in libnetlink or maybe even the netlink
049c96
    protocol itself.
049c96
049c96
    Signed-off-by: Phil Sutter <phil@nwl.cc>
049c96
---
049c96
 lib/libnetlink.c | 2 +-
049c96
 1 file changed, 1 insertion(+), 1 deletion(-)
049c96
049c96
diff --git a/lib/libnetlink.c b/lib/libnetlink.c
049c96
index b2a300e..96bde59 100644
049c96
--- a/lib/libnetlink.c
049c96
+++ b/lib/libnetlink.c
049c96
@@ -202,7 +202,7 @@ int rtnl_dump_filter_l(struct rtnl_handle *rth,
049c96
 		.msg_iov = &iov,
049c96
 		.msg_iovlen = 1,
049c96
 	};
049c96
-	char buf[16384];
049c96
+	char buf[32768];
049c96
 	int dump_intr = 0;
049c96
 
049c96
 	iov.iov_base = buf;
049c96
-- 
049c96
1.8.3.1
049c96