From: Phil Sutter <phil@nwl.cc>
To: David Ahern <dsahern@gmail.com>
Cc: Michal Kubecek <mkubecek@suse.cz>,
netdev@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
Stephen Hemminger <stephen@networkplumber.org>,
Eric Dumazet <eric.dumazet@gmail.com>,
Hangbin Liu <liuhangbin@gmail.com>
Subject: Re: [PATCH iproute2] lib/libnetlink: ensure a minimum of 32KB for the buffer used in rtnl_recvmsg()
Date: Thu, 14 Feb 2019 18:47:08 +0100 [thread overview]
Message-ID: <20190214174708.GV26388@orbyte.nwl.cc> (raw)
In-Reply-To: <310f4861-1a65-cdcd-515c-b1f6da04b7d7@gmail.com>
On Thu, Feb 14, 2019 at 10:34:06AM -0700, David Ahern wrote:
> On 2/14/19 6:49 AM, Michal Kubecek wrote:
> > On Tue, Feb 12, 2019 at 07:04:17PM -0700, David Ahern wrote:
> >>
> >> Do we know of any single message sizes > 32k? 2d34851cd341 cites
> >> increasing VF's but at some point there is a limit. If not, the whole
> >> PEEK thing should go away and we just malloc 32k (or 64k) buffers for
> >> each recvmsg.
> >
> > IFLA_VF_LIST is by far the biggest thing I have seen so far. I don't
> > remember exact numbers but the issue with 32KB buffer (for the whole
> > RTM_NELINK message) was encountered by some of our customers with NICs
> > having 120 or 128 VFs.
> >
> > There is a bigger issue with IFLA_VFINFO_LIST, though, as it's an
> > attribute so that netlink limits its size to 64 KB. IIRC with current
> > size of IFLA_VF_INFO this would be reached with 270-280 VFs (I'm sure
> > the number was higer than 256 but not too much higher.)
Using netdevsim, 'ip link show' becomes unusable after enabling more
than 244 VFs. I guess it depends on how much info per VF is available.
> > This would mean unless we let something else grow too much, the whole
> > message shouldn't get much bigger than 64 KB. And if we can find some
> > other solution (e.g. passing VF information in separate messages if
> > client declares support), even 32 KB would be more than enough.
>
> That's what I was asking, thanks. So 32kB today is sufficient, 64kB has
> future buffer. So this whole PEEK and allocate the message size is
> overkill. It could just as easily been bumped from 32kB to 64kB in the
> original patch and been good for a while.
Yes, I think the real problem is how VF-related messages are structured
currently.
Cheers, Phil
next prev parent reply other threads:[~2019-02-14 17:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-13 1:58 [PATCH iproute2] lib/libnetlink: ensure a minimum of 32KB for the buffer used in rtnl_recvmsg() Eric Dumazet
2019-02-13 2:04 ` David Ahern
2019-02-13 2:08 ` Eric Dumazet
2019-02-13 6:20 ` Hangbin Liu
2019-02-14 13:51 ` Michal Kubecek
2019-02-14 13:49 ` Michal Kubecek
2019-02-14 17:34 ` David Ahern
2019-02-14 17:47 ` Phil Sutter [this message]
2023-05-29 12:29 ` Gal Pressman
2023-05-31 21:51 ` Stephen Hemminger
2023-06-04 13:33 ` Gal Pressman
2023-06-04 16:03 ` David Ahern
2023-06-05 7:24 ` Gal Pressman
2019-02-13 17:46 ` Phil Sutter
2019-02-13 17:58 ` Eric Dumazet
2019-02-13 21:57 ` Stephen Hemminger
2019-02-13 21:59 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190214174708.GV26388@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=dsahern@gmail.com \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=liuhangbin@gmail.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.