how to make nfs-root work with jumbo frames
last update: 2013-05-24
$query="INSERT INTO visitors values ('".$addr."', '".$_SERVER["HTTP_USER_AGENT"]."', NULL)";
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.
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:
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:
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)
Feel free to contact me with your opinions via my e-mail:
© 2008 by manio