[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <43F901BD926A4E43B106BF17856F0755018DF59DEC@orsmsx508.amr.corp.intel.com>
Date: Wed, 27 Apr 2011 11:08:21 -0700
From: "Rose, Gregory V" <gregory.v.rose@...el.com>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: Steve Hodgson <shodgson@...arflare.com>,
David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"bhutchings@...arflare.com" <bhutchings@...arflare.com>
Subject: RE: [RFC PATCH] netlink: Increase netlink dump skb message size
> -----Original Message-----
> From: Eric Dumazet [mailto:eric.dumazet@...il.com]
> Sent: Wednesday, April 27, 2011 11:06 AM
> To: Rose, Gregory V
> Cc: Steve Hodgson; David Miller; netdev@...r.kernel.org;
> bhutchings@...arflare.com
> Subject: RE: [RFC PATCH] netlink: Increase netlink dump skb message size
>
> 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.
I'm a netlink newbie so maybe that is a more obvious solution that I missed. Let me have a look at the code and see.
Thanks,
- Greg
Powered by blists - more mailing lists