Message ID | 972878625.39892449.1441867226052.JavaMail.zimbra@oxygem.tv |
---|---|
State | RFC, archived |
Delegated to: | stephen hemminger |
Headers | show |
On 9/9/15, 11:40 PM, Alexandre DERUMIER wrote: > Hi, > > This still not fixed in iproute 4.2. > > Is they any plan to increase the rtnl_dump_filter buffer size soon ? > Instead of increasing the default size, it would be nicer if this was configurable for iproute2 (I haven't looked yet). -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: roopa <roopa@cumulusnetworks.com> Date: Thu, 10 Sep 2015 15:26:30 -0700 > On 9/9/15, 11:40 PM, Alexandre DERUMIER wrote: >> Hi, >> >> This still not fixed in iproute 4.2. >> >> Is they any plan to increase the rtnl_dump_filter buffer size soon ? > > Instead of increasing the default size, it would be nicer if this was > configurable for iproute2 (I haven't looked yet). I would definitely prefer this be done in a run-time manner of some sort, and then other libraries can use iproute2's logic as a reference for how to deal with this reliably, properly, and in a %100 future-proof manner. Something of the "if request X fails, double the buffer size" variety. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 9/10/15, 3:58 PM, David Miller wrote: > From: roopa <roopa@cumulusnetworks.com> > Date: Thu, 10 Sep 2015 15:26:30 -0700 > >> On 9/9/15, 11:40 PM, Alexandre DERUMIER wrote: >>> Hi, >>> >>> This still not fixed in iproute 4.2. >>> >>> Is they any plan to increase the rtnl_dump_filter buffer size soon ? >> Instead of increasing the default size, it would be nicer if this was >> configurable for iproute2 (I haven't looked yet). > I would definitely prefer this be done in a run-time manner of some > sort, and then other libraries can use iproute2's logic as a reference > for how to deal with this reliably, properly, and in a %100 > future-proof manner. > > Something of the "if request X fails, double the buffer size" variety. agreed. This would be ideal. libnl already handles it this way. We have to move iproute2 recv buffer to dynamic allocation and also realloc on MSG_TRUNC. I can get to it one of these days unless somebody beats me to it. thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/lib/libnetlink.c b/lib/libnetlink.c index 901236e..25c1c02 100644 --- a/lib/libnetlink.c +++ b/lib/libnetlink.c @@ -198,7 +198,7 @@ int rtnl_dump_filter_l(struct rtnl_handle *rth, .msg_iov = &iov, .msg_iovlen = 1, }; - char buf[16384]; + char buf[3*16384]; int dump_intr = 0; iov.iov_base = buf;