[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170929125507.nkut3wtsvhq44evj@unicorn.suse.cz>
Date: Fri, 29 Sep 2017 14:55:07 +0200
From: Michal Kubecek <mkubecek@...e.cz>
To: Hangbin Liu <haliu@...hat.com>
Cc: netdev@...r.kernel.org,
Stephen Hemminger <stephen@...workplumber.org>,
Phil Sutter <phil@....cc>, Hangbin Liu <liuhangbin@...il.com>
Subject: Re: [PATCHv4 iproute2 1/2] lib/libnetlink: re malloc buff if size is
not enough
On Thu, Sep 28, 2017 at 09:33:45PM +0800, Hangbin Liu wrote:
> From: Hangbin Liu <liuhangbin@...il.com>
>
> 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 code the buffer size and malloc the correct number when running.
>
> Introduce function rtnl_recvmsg() to always return a newly allocated buffer.
> The caller need to free it after using.
>
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
> Signed-off-by: Phil Sutter <phil@....cc>
> ---
> lib/libnetlink.c | 114 ++++++++++++++++++++++++++++++++++++++-----------------
> 1 file changed, 80 insertions(+), 34 deletions(-)
>
Reviewed-by: Michal Kubecek <mkubecek@...e.cz>
Powered by blists - more mailing lists