Jumbo Frames

The CDC-ECM protocol (and other networking over USB protocols) describe procedures to transport 802.3-like frames over USB. Standard physical Ethernet frames have an MTU (maximum transfer unit) of 1500 bytes, but there is no such limitation in USB. USB transfers can be up to 64KB in size.

In the world of physical Ethernets, Gigabit Ethernets also see the 1500 limit as insufficient, and so there is provision in the network stacks of Windows, (embedded) Linux and other operating systems for jumbo frames. The actual MTU is a property of the network card and its driver. There is a procedure for two ends of an Ethernet link to discover the actual MTU in effect.

The Gadget implementation of CDC-ECM (the g_ether module) can be readily patched to support larger MTU’s.



After doing so, here is a little table of results for various MTU’s under 2 tests
1) UPLOAD: transfer a 256MB file from the device to the PC
2) DOWNLOAD: transfer a 256MB file from PC to the device


MTUUPLOAD speedDOWNLOAD speed
1500 bytes9 MB/s4.15 MB/s
3000 bytes9 MB/s4.78 MB/s
6000 bytes11.1 MB/s4.42 MB/s
9000 bytes11.1 MB/s4.59 MB/s
12000 bytes11.1 MB/s4.67 MB/s
24000 bytes9.95 MB/s4.64 MB/s
It can be seen that the download (PC to device) speed does not change much, but the upload (device to PC) speed shows a noticeable increase.

There is a sweet spot for MTU 9000, a typical Jumbo MTU used by physical networks as well.

Footnote:
  • If Linux sets the MTU to 3014, then Windows will report an MTU of 3000. So the MTU on the Linux (device) side should be set to 14 bytes higher than you want Windows to report.
  • Implementation -- Belcarra has a simple patch to assist in supporting Jumbo frames for g_ether.

Favourites