netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [iproute PATCH] libnetlink: Double the dump buffer size
@ 2016-03-04 18:57 Phil Sutter
  0 siblings, 0 replies; 5+ messages in thread
From: Phil Sutter @ 2016-03-04 18:57 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

There have been reports about 'ip addr' printing "Message truncated" on
systems with large numbers of VFs. Although I haven't been able to get
my hands on hardware suitable to reproduce this, increasing the dump
buffer has been reported to resolve the issue. For want of a better
idea, just double the buffer size to 32k.

Feels like this opportunistic buffer size selection is rather
workarounding a design flaw in libnetlink or maybe even the netlink
protocol itself.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 lib/libnetlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libnetlink.c b/lib/libnetlink.c
index d6b5fd3e8a493..245c4ca216753 100644
--- a/lib/libnetlink.c
+++ b/lib/libnetlink.c
@@ -223,7 +223,7 @@ int rtnl_dump_filter_l(struct rtnl_handle *rth,
 		.msg_iov = &iov,
 		.msg_iovlen = 1,
 	};
-	char buf[16384];
+	char buf[32768];
 	int dump_intr = 0;
 
 	iov.iov_base = buf;
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-08 13:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <8e235f49b8314d70bbf76709a81c4d84@HQ1WP-EXMB11.corp.brocade.com>
2016-03-04 23:35 ` [iproute PATCH] libnetlink: Double the dump buffer size Stephen Hemminger
2016-03-05  0:57   ` Phil Sutter
2016-03-05 21:12   ` Johannes Berg
     [not found]   ` <20160305005746.GS28939@base.sg13b.nwl.cc>
2016-03-08 13:28     ` Phil Sutter
2016-03-04 18:57 Phil Sutter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).