netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: gregory.v.rose@intel.com, netdev@vger.kernel.org,
	bhutchings@solarflare.com
Subject: Re: [RFC PATCH] netlink: Increase netlink dump skb message size
Date: Mon, 25 Apr 2011 23:56:00 -0700 (PDT)	[thread overview]
Message-ID: <20110425.235600.104065244.davem@davemloft.net> (raw)
In-Reply-To: <1303799597.2747.214.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 26 Apr 2011 08:33:17 +0200

> Le lundi 25 avril 2011 à 15:01 -0700, Greg Rose a écrit :
>> The message size allocated for rtnl info dumps was limited to a single page.
>> This is not enough for additional interface info available with devices
>> that support SR-IOV.  Check that the amount of data allocated is sufficient
>> for the amount of data requested.
>> 
>> Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
>> ---
>> 
>>  include/linux/rtnetlink.h |    1 +
>>  net/core/rtnetlink.c      |    6 ++++++
>>  net/netlink/af_netlink.c  |   37 +++++++++++++++++++++++++++++++------
>>  3 files changed, 38 insertions(+), 6 deletions(-)
>> 
> 
> Hmm, thats a hack, because netlink_dump() is generic and you add
> something very specific.

You also can't do this without breaking applications.

We've trained every single netlink library out there about this message size
formula, so they know that if you allocate at least 8192 bytes for a recvmsg()
call they can receive fully any single netlink message.

And they must be able to make assumptions like this, otherwise they
cannot know how to reliably be able to receive a netlink message in
it's entirety in a generic fashion.

So one must not attack this problem from this angle.

It is absolutely necessary to find some way to report the VF
information, out of band, instead of trying to make the message
larger.

Needing more than 8K to get a dump of a single device over netlink is
absolutely rediculious, this VF stuff was poorly designed.  If has to
be fixed and the current stuff marked deprecated.

  reply	other threads:[~2011-04-26  6:56 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 [this message]
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
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=20110425.235600.104065244.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=bhutchings@solarflare.com \
    --cc=eric.dumazet@gmail.com \
    --cc=gregory.v.rose@intel.com \
    --cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).