From: Stefan Gula <steweg@ynet.sk>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [patch v1, kernel 3.2.1] RTNETLINK adjusting values of min_ifinfo_dump_size
Date: Wed, 25 Jan 2012 09:43:15 +0100 (CET) [thread overview]
Message-ID: <26709175.701327480995351.JavaMail.root@5-MeO-DMT.ynet.sk> (raw)
In-Reply-To: <30372884.681327480899559.JavaMail.root@5-MeO-DMT.ynet.sk>
From: Stefan Gula <steweg@gmail.com>
This patch extends the rtnetlink.c. The problem is that calcit, which
returns the value min_ifinfo_dump_size, is called without ability to
get device info as well (struct net_device *dev is not accessible from
it). This create a problem if required size of struct sk_buff *skb is
not enough big to comply with all data returned by fill_info function
for the interface that required size can vary over time, e.g. some
dynamic structures will be putted to skb like hlists or lists. To do
this patch extends the do_setlink function with recalculating of
min_ifinfo_dump_size accordingly to device type and get_size
functions.
Signed-off-by: Stefan Gula <steweg@gmail.com>
---
code needed to be ok before I can resubmit my macvlan source mode patch
--- linux-3.2.1-orig/net/core/rtnetlink.c 2012-01-12 20:42:45.000000000 +0100
+++ linux/net/core/rtnetlink.c 2012-01-24 14:26:58.083219352 +0100
@@ -1506,6 +1506,9 @@ errout:
if (send_addr_notify)
call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
+ min_ifinfo_dump_size = max_t(u16, if_nlmsg_size(dev),
+ min_ifinfo_dump_size);
+
return err;
}
next parent reply other threads:[~2012-01-25 8:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <30372884.681327480899559.JavaMail.root@5-MeO-DMT.ynet.sk>
2012-01-25 8:43 ` Stefan Gula [this message]
2012-01-26 2:36 ` David Miller
2012-01-26 11:01 ` Štefan Gula
2012-01-26 18:30 ` David Miller
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=26709175.701327480995351.JavaMail.root@5-MeO-DMT.ynet.sk \
--to=steweg@ynet.sk \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®