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

From: Tony Nguyen
Date: Wed Mar 06 2024 - 19:28:13 EST


On 3/4/2024 6:22 PM, Erwan Velu wrote:
I was also wondering if I shouldn't subtract I40E_PACKET_HDR_PAD from
the mfs to be more accurate, can you confirm this ?

Yes, you're correct, we should take the packet header out however...

If one can have a look at what is the exact procedure to fix the MFS
size when too small, that would be lovely/ideal in addition to my
patch.

.. as you allude to here, we should resolve the MFS size issue.

You were on that right track (as mentioned in your commit message)

> 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.

The ice driver is doing this with the ice_aq_set_mac_cfg() call. You should be able to model the same here.

Thanks,
Tony