Re: [PATCHv2 iproute2 1/2] lib/libnetlink: re malloc buff if size is not enough

2017-09-19 Thread Michal Kubecek
On Tue, Sep 19, 2017 at 11:05:20AM +0800, Hangbin Liu wrote: > On Mon, Sep 18, 2017 at 09:55:05AM +0200, Michal Kubecek wrote: > > > @@ -471,19 +516,23 @@ int rtnl_dump_filter_l(struct rtnl_handle *rth, > > > > > > if (h->nlmsg_type == NLMSG_ERROR) { > > >

Re: [PATCHv2 iproute2 1/2] lib/libnetlink: re malloc buff if size is not enough

2017-09-18 Thread Hangbin Liu
Hi Michal, On Mon, Sep 18, 2017 at 09:55:05AM +0200, Michal Kubecek wrote: > > +static int rtnl_recvmsg(int fd, struct msghdr *msg, char **answer) > > +{ > > + struct iovec *iov; > > + int len = -1, buf_len = 32768; > > + char *bufp, *buf = NULL; > > + > > + int flag = MSG_PEEK | MSG_TRUNC

Re: [PATCHv2 iproute2 1/2] lib/libnetlink: re malloc buff if size is not enough

2017-09-18 Thread Michal Kubecek
On Wed, Sep 13, 2017 at 05:59:39PM +0800, Hangbin Liu wrote: > With commit 72b365e8e0fd ("libnetlink: Double the dump buffer size") > we doubled the buffer size to support more VFs. But the VFs number is > increasing all the time. Some customers even use more than 200 VFs now. > > We could not dou

[PATCHv2 iproute2 1/2] lib/libnetlink: re malloc buff if size is not enough

2017-09-13 Thread Hangbin Liu
With commit 72b365e8e0fd ("libnetlink: Double the dump buffer size") we doubled the buffer size to support more VFs. But the VFs number is increasing all the time. Some customers even use more than 200 VFs now. We could not double it everytime when the buffer is not enough. Let's just not hard cod