Comment 34 for bug 1679823

Revision history for this message
Jesse Sung (wenchien) wrote : Re: bond0: Invalid MTU 9000 requested, hw max 1500 with kernel 4.10 (or 4.8.0-49)

@jsalisbury: I figured it out...

We're talking about two issues here.

The first one is unable to set MTU larger than 1500 on some devices.

Commit e84f31d (yakkety), "net: centralize net_device min/max MTU checking", introduced net_device.min_mtu and net_device.max_mtu. These values will be checked before net_device_ops.ndo_change_mtu().

Then the second commit 04db90d (yakkety) set the default value of min_mtu to ETH_MIN_MTU(68) and max_mtu to ETH_DATA_LEN(1500), removed *most* of the ndo_change_mtu() callback, and initialize min_mtu/max_mtu in each driver if it should be something different than the default values.

Here I say most because intel drivers are not modified by this commit. Intel drivers are handled by commit 91c527a5. My e1000e works properly after this commit is merged. For bonding devices it's commit 31c0541.

The second issue is it shows
"Invalid MTU 9000 requested, hw max 68"
instead of
"Invalid MTU 9000 requested, hw max 1500".

This is a typo in commit 04db90d and can be fixed by commit a0e65de.

A test kernel with 91c527a5, 31c0541, and a0e65de merged can be found at
https://people.canonical.com/~jesse/lp1679823/