Download #
| File | Description |
|---|---|
| nfsroot_jumbo_v2_linux-2.6.28.diff | 2704B, patch for kernel version 2.6.28 |
| nfsroot_jumbo_v2_linux-2.6.21.diff | 2670B, patch for kernel version 2.6.21 (second version - patch modified to use a kernel parameter) |
| nfsroot_jumbo_linux-2.6.21.diff | 424B, patch for kernel version 2.6.21 (first version - hard coded mtu value) |
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=9000Update 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: