From: manio@skyboo.net
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, manio@skyboo.net, netdev@vger.kernel.org
Subject: [PATCH 2.6.21.1] nfs-root: added possibility to override default MTU (for UDP jumbo frames)
Date: Mon, 02 Jul 2007 14:38:16 +0200 [thread overview]
Message-ID: <E1I5LAW-0004Dn-8b@skyboo.net> (raw)
To use a NFS-root for UDP jumbo frames the kernel on the client need to bring
up interface with MTU set to 9000 bytes - otherwise it cannot contact server
with jumbo frames enabled (nfs server not responding, still trying) and cannot
boot. Added a kernel parameter named 'ipmtu' which can be used to specify
initial MTU size when booting via nfsroot.
Signed-off-by: Mariusz Bialonczyk <manio@skyboo.net>
diff -Nru linux-2.6.21.1-orig/Documentation/kernel-parameters.txt linux-2.6.21.1/Documentation/kernel-parameters.txt
--- linux-2.6.21.1-orig/Documentation/kernel-parameters.txt 2007-04-27 23:49:26.000000000 +0200
+++ linux-2.6.21.1/Documentation/kernel-parameters.txt 2007-07-01 18:47:11.000000000 +0200
@@ -720,6 +720,9 @@
ip2= [HW] Set IO/IRQ pairs for up to 4 IntelliPort boards
See comment before ip2_setup() in drivers/char/ip2.c.
+ ipmtu= [IP_PNP]
+ See Documentation/nfsroot.txt.
+
ips= [HW,SCSI] Adaptec / IBM ServeRAID controller
See header of drivers/scsi/ips.c.
diff -Nru linux-2.6.21.1-orig/Documentation/nfsroot.txt linux-2.6.21.1/Documentation/nfsroot.txt
--- linux-2.6.21.1-orig/Documentation/nfsroot.txt 2007-04-27 23:49:26.000000000 +0200
+++ linux-2.6.21.1/Documentation/nfsroot.txt 2007-07-01 19:02:40.000000000 +0200
@@ -153,6 +153,16 @@
Default: any
+ipmtu=<mtu_value>
+
+ This parameter tells the kernel to override default MTU size to specified
+ <mtu_value>. Useful in cases where NFS server have jumbo frames enabled and
+ client can't connect via UDP because of default MTU value (in ethernet
+ usually 1500 bytes). With this option before bringing interface up, kernel
+ will set the passed MTU size. In case of NFS-root booting server and client
+ can use UDP jumbo frames (NFS's rsize and wsize set to 8192 for instance).
+
+
3.) Boot Loader
diff -Nru linux-2.6.21.1-orig/net/ipv4/ipconfig.c linux-2.6.21.1/net/ipv4/ipconfig.c
--- linux-2.6.21.1-orig/net/ipv4/ipconfig.c 2007-04-27 23:49:26.000000000 +0200
+++ linux-2.6.21.1/net/ipv4/ipconfig.c 2007-07-01 15:44:44.000000000 +0200
@@ -113,6 +113,8 @@
*/
int ic_set_manually __initdata = 0; /* IPconfig parameters set manually */
+unsigned int ic_mtu __initdata = 0; /* IPconfig MTU parameter: 0 - defaults, other - override */
+
static int ic_enable __initdata = 0; /* IP config enabled? */
/* Protocol choice */
@@ -209,6 +211,11 @@
able &= ic_proto_enabled;
if (ic_proto_enabled && !able)
continue;
+ if (ic_mtu > 0)
+ {
+ printk(KERN_ERR "IP-Config: Overriding %s MTU to %d bytes\n", dev->name, ic_mtu);
+ dev->mtu = ic_mtu;
+ }
oflags = dev->flags;
if (dev_change_flags(dev, oflags | IFF_UP) < 0) {
printk(KERN_ERR "IP-Config: Failed to open %s\n", dev->name);
@@ -1506,5 +1513,14 @@
return ip_auto_config_setup(addrs);
}
+static int __init mtu_config_setup(char *str)
+{
+ if (!str)
+ return 0;
+ ic_mtu = simple_strtoul(str, &str, 0);
+ return 1;
+}
+
__setup("ip=", ip_auto_config_setup);
+__setup("ipmtu=", mtu_config_setup);
__setup("nfsaddrs=", nfsaddrs_config_setup);
next reply other threads:[~2007-07-02 13:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-02 12:38 manio [this message]
2007-07-02 13:13 ` Peter Staubach
2007-07-02 16:27 ` manio
2007-07-02 14:09 ` Krzysztof Halasa
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=E1I5LAW-0004Dn-8b@skyboo.net \
--to=manio@skyboo.net \
--cc=akpm@linux-foundation.org \
--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®