public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* rtnetlink and many VFs
@ 2011-04-21 14:36 Ben Hutchings
  2011-04-21 17:02 ` Rose, Gregory V
  0 siblings, 1 reply; 9+ messages in thread
From: Ben Hutchings @ 2011-04-21 14:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, sf-linux-drivers

My colleagues have been working on SR-IOV support for sfc.  The hardware
supports up to 127 VFs per port.

If we configure all 127 VFs through the net device, an RTM_GETLINK dump
will need to include messages describing them, with a total size of:

127 * (sizeof(struct ifla_vf_mac) + sizeof(struct ifla_vf_vlan) +
       sizeof(struct ifla_vf_tx_rate) + protocol overhead)
> 7112

These messages are nested within the message describing the device as a
whole, so they cannot be split.  The maximum size of an outgoing netlink
message, based on NLMSG_GOODSIZE, seems to be min(PAGE_SIZE, 8192).  So
when PAGE_SIZE = 4096 it is simply impossible to dump information about
such a device!

I think it needs to be made possible to grow a netlink skb during
generation of the first message.  Userspace may still be unable to
receive the large message but at least it has a chance.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-04-22 22:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-21 14:36 rtnetlink and many VFs Ben Hutchings
2011-04-21 17:02 ` Rose, Gregory V
2011-04-21 17:40   ` Ben Hutchings
2011-04-21 17:50     ` Rose, Gregory V
2011-04-21 18:11       ` Ben Hutchings
2011-04-21 18:28         ` Rose, Gregory V
2011-04-22 22:29         ` Rose, Gregory V
2011-04-22 22:31           ` David Miller
2011-04-22 22:49             ` Rose, Gregory V

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox