Thread (18 messages) 18 messages, 5 authors, 2011-04-29

RE: [RFC PATCH] netlink: Increase netlink dump skb message size

From: Rose, Gregory V <hidden>
Date: 2011-04-26 16:02:28

-----Original Message-----
From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
Sent: Monday, April 25, 2011 11:33 PM
To: Rose, Gregory V
Cc: netdev@vger.kernel.org; bhutchings@solarflare.com; davem@davemloft.net
Subject: Re: [RFC PATCH] netlink: Increase netlink dump skb message size

Le lundi 25 avril 2011 à 15:01 -0700, Greg Rose a écrit :
quoted
The message size allocated for rtnl info dumps was limited to a single
page.
quoted
This is not enough for additional interface info available with devices
that support SR-IOV.  Check that the amount of data allocated is
sufficient
quoted
for the amount of data requested.

Signed-off-by: Greg Rose <redacted>
---

 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.
I'll have a look at that, although Dave's not too happy with the whole lot of this mess and I very much agree with him.

- Greg
quoted hunk ↗ jump to hunk
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);
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help