From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Rose, Gregory V" <gregory.v.rose@intel.com>
Cc: Steve Hodgson <shodgson@solarflare.com>,
David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"bhutchings@solarflare.com" <bhutchings@solarflare.com>
Subject: RE: [RFC PATCH] netlink: Increase netlink dump skb message size
Date: Wed, 27 Apr 2011 20:05:40 +0200 [thread overview]
Message-ID: <1303927540.3166.129.camel@edumazet-laptop> (raw)
In-Reply-To: <43F901BD926A4E43B106BF17856F0755018DF59D81@orsmsx508.amr.corp.intel.com>
Le mercredi 27 avril 2011 à 10:39 -0700, Rose, Gregory V a écrit :
> Right, but when I look in rtnetlink I see the routine to calculate the
> amount of buffer needed for VF info dump is the number of device
> parent (PF) VFs * the sizeof various IFLA_VF_INFO items. The more the
> VFs the bigger this gets, especially if you want to add more stuff to
> IFLA_VF_INFO. So when the kernel dumps this all out it can get bigger
> than the NLMSG_GOODSIZE (or DUMPSIZE) pretty quickly.
>
> >
> > BTW "ip" uses a 16384 bytes buffer, not a 8192 bytes one.
>
> I know, that's why I suffered some confusion about which size to use.
> The ip command uses 16K but the NLMSG_GOODSIZE can be as small as 3712
> bytes (depending on page size). Despite the user buffer being 16k if
> the size calculated by if_nlmsg_size() in rtnetlink.c is bigger than
> NLMSG_GOODSIZE then you don't see the info for more than 40 or so VFs.
> More VFs than that and nothing gets displayed.
>
One solution is to change rtnl_dump_ifinfo() to call rtnl_fill_ifinfo()
once time per device (RTM_NEWLINK like now but no more VFINFO inside),
then call another function to provide vf/vlan informations (RTM_NEWVF),
using cb->args[2] as an index into VF space, so that we can stop if
current skb is filled, and next recvmsg() starts at previous saved
index.
Or implement a new "ip vf ..." dumper and only dumps RTM_NEWVF messages.
next prev parent reply other threads:[~2011-04-27 18:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-25 22:01 [RFC PATCH] netlink: Increase netlink dump skb message size Greg Rose
2011-04-26 6:33 ` Eric Dumazet
2011-04-26 6:56 ` David Miller
2011-04-26 16:12 ` Rose, Gregory V
2011-04-26 16:21 ` Eric Dumazet
2011-04-26 16:24 ` Rose, Gregory V
2011-04-26 19:07 ` Ben Hutchings
2011-04-26 21:58 ` Rose, Gregory V
2011-04-27 15:46 ` Steve Hodgson
2011-04-27 16:30 ` Eric Dumazet
2011-04-27 17:15 ` Rose, Gregory V
2011-04-27 17:29 ` Eric Dumazet
2011-04-27 17:39 ` Rose, Gregory V
2011-04-27 18:05 ` Eric Dumazet [this message]
2011-04-27 18:08 ` Rose, Gregory V
2011-04-26 16:02 ` Rose, Gregory V
2011-04-29 19:29 ` David Miller
2011-04-29 19:37 ` Rose, Gregory V
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=1303927540.3166.129.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=gregory.v.rose@intel.com \
--cc=netdev@vger.kernel.org \
--cc=shodgson@solarflare.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox