Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Greg Rose <gregory.v.rose@intel.com>
Cc: netdev@vger.kernel.org, bhutchings@solarflare.com, davem@davemloft.net
Subject: Re: [RFC PATCH] netlink: Increase netlink dump skb message size
Date: Tue, 26 Apr 2011 08:33:17 +0200	[thread overview]
Message-ID: <1303799597.2747.214.camel@edumazet-laptop> (raw)
In-Reply-To: <20110425220157.2012.96707.stgit@gitlad.jf.intel.com>

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.

I prefer something that allows one dump() to reallocate a bigger skb

Maybe changing->dump() prototype to struct sk_buff **pskb instead of
struct sk_buff *skb.

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index c8f35b5..7fa6735 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1681,7 +1681,7 @@ static int netlink_dump(struct sock *sk)
 		goto errout_skb;
 	}
 
-	len = cb->dump(skb, cb);
+	len = cb->dump(&skb, cb);
 
 	if (len > 0) {
 		mutex_unlock(nlk->cb_mutex);



  reply	other threads:[~2011-04-26  6:33 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 [this message]
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
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=1303799597.2747.214.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 \
    /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