[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <25f0ec07-e36a-510c-c01f-56df8a843f80@gmail.com>
Date: Thu, 26 Oct 2017 09:28:00 -0600
From: David Ahern <dsahern@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Hangbin Liu <liuhangbin@...il.com>, netdev@...r.kernel.org,
Michal Kubecek <mkubecek@...e.cz>, Phil Sutter <phil@....cc>
Subject: Re: [PATCHv5 iproute2 net-next 2/2] lib/libnetlink: re malloc buff if
size is not enough
On 10/26/17 4:24 AM, Stephen Hemminger wrote:
>>
>> The kernel needs a flag that says "give me the message of the buffer is
>> large enough; if not just PEEK and tell me the length." That would avoid
>> the double call in most cases.
>
> Actually this has little impact because old code was doing implicit zero
> of whole buffer, new code does not.
>
The patch calls recvmsg twice; libnl does the same thing. It would be
better performance wise to have a flag that allows retrieval of the
message if the supplied buffer is large enough and PEEK semantics if
not. It was really a comment on how we could do better with proper
kernel support.
Powered by blists - more mailing lists