Re: [PATCH] i40e: Prevent setting MTU if greater than MFS

From: Tony Nguyen
Date: Mon Mar 04 2024 - 17:14:50 EST


On 2/27/2024 11:27 AM, Erwan Velu wrote:
Commit 6871a7de705b6f6a4046f0d19da9bcd689c3bc8e from iPXE project is
setting the MFS to 0x600 = 1536.

At boot time the i40e driver complains about it with
the following message but continues.

MFS for port 1 has been set below the default: 600

If the MTU size is increased, the driver accept it but large packets will not
be processed by the firmware generating tx_errors. The issue is pretty
silent for users. i.e doing TCP in such context will generates lots of
retransmissions until the proper window size (below 1500) will be used.

To fix this case, it would have been ideal to increase the MFS,
via i40e_aqc_opc_set_mac_config, but I didn't found a reliable way to do it.

At least, this commit prevents setting up an MTU greater than the current MFS.
It will avoid being in the position of having an MTU set to 9000 on the
netdev with a firmware refusing packets larger than 1536.

A typical trace looks like the following :
[ 377.548696] i40e 0000:5d:00.0 eno5: Error changing mtu to 9000 which is greater than the current mfs: 1536

Signed-off-by: Erwan Velu <e.velu@xxxxxxxxxx>

The Author and Sign-off needs to be fixed; they don't match.

WARNING: From:/Signed-off-by: email address mismatch: 'From: Erwan Velu <erwanaliasr1@xxxxxxxxx>' != 'Signed-off-by: Erwan Velu <e.velu@xxxxxxxxxx>'

Thanks,
Tony