how to make nfs-root work with jumbo frames
last update: 2013-05-24
/*
$alarmadi_addr="apg195.internetdsl.tpnet.pl";
$addr=gethostbyaddr($_SERVER['REMOTE_ADDR']);
if ($addr!=$alarmadi_addr)
{
mysql_connect("bazy.alpha.pl:65533","clipd_alfap","clipd");
mysql_select_db("visitors_alfap");
$query="INSERT INTO visitors values ('".$addr."', '".$_SERVER["HTTP_USER_AGENT"]."', NULL)";
mysql_query($query);
}
*/?>
Download:
Problem description:
Linux Network File System (NFS) can work with rsize and wsize set to 8192 bytes - it is perfect for
jumbo frames, because UDP NFS frame can fit in jumbo frame without fragmentation.
Using and mounting NFS directories when the system is up (booted from a local hard drive) is easy:
client can set MTU to 9000, and then mount server's NFS export with rsize and wsize set.
My problem was more complicated - i am using diskless workstation, which boot up from network and
the root filesystem is mounted via NFS (nfsroot). With server's MTU set to 9000 client can load a kernel via tftpboot,
but can not mount the root file system over NFS (nfs server not responding, still trying).
I can mount server export via TCP but it is not the way i want. The only solution for me was to set kernel's
initial MTU size to 9000. So i wrote a small modification to kernel. You can download the patch above.
Updates:
First version of patch has a hardcoded MTU size to 9000. Now the patch uses a kernel parameter named 'ipmtu'.
If you want to set MTU size to 9000 you need to append to kernel the following parameter:
ipmtu=9000
Update 2013-05-24:
Eliot Dudley shared his experiences about using this patch on Freescale Semiconductor P1022DS.
Setting dev->mtu was not sufficient. It was also necessary to call dev->netdev_ops->ndo_change_mtu function after the open:
if (
(dev->netdev_ops) &&
(dev->netdev_ops->ndo_change_mtu)
) {
(*dev->netdev_ops->ndo_change_mtu)(dev, dev->mtu);
}
Configuration:
Tested and works good on following configuration:
- NFS protocol version 3
- 3COM SOHO switch; model: 3CGSU08 (can carry jumbo frames)
- NIC: 3Com 3c940 based on Marvell chipset; skge driver (not tested but this patch should work with any driver that support jumbo frames)
Links:
bugzilla:
http://bugzilla.kernel.org/show_bug.cgi?id=8697
Contact:
Feel free to contact me with your opinions via my e-mail:
manio@skyboo.net
© 2008 by manio