> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of Jacob 
> Keller
> Sent: 28 August 2025 02:48
> To: Intel Wired LAN <[email protected]>; Nguyen, Anthony L 
> <[email protected]>; [email protected]
> Cc: Keller, Jacob E <[email protected]>
> Subject: [Intel-wired-lan] [PATCH iwl-net v3] i40e: fix Jumbo Frame support 
> after iPXE boot
>
> The i40e hardware has multiple hardware settings which define the Maximum 
> Frame Size (MFS) of the physical port. The firmware has an AdminQ command
(0x0603) to configure the MFS, but the i40e Linux driver never issues this 
command.
>
> In most cases this is no problem, as the NVM default value has the device 
> configured for its maximum value of 9728. Unfortunately, recent versions of 
> the iPXE intelxl driver now issue the 0x0603 Set Mac Config command, 
> modifying the MFS and reducing it from its default value of 9728.
>
> This occurred as part of iPXE commit 6871a7de705b ("[intelxl] Use admin queue 
> to set port MAC address and maximum frame size"), a prerequisite change for 
> supporting the E800 series hardware in iPXE. Both the E700 and
> E800 firmware support the AdminQ command, and the iPXE code shares much of 
> the logic between the two device drivers.
>
> The ice E800 Linux driver already issues the 0x0603 Set Mac Config command 
> early during probe, and is thus unaffected by the iPXE change.
>
> Since commit 3a2c6ced90e1 ("i40e: Add a check to see if MFS is set"), the 
> i40e driver does check the I40E_PRTGL_SAH register, but it only logs a 
> warning message if its value is below the 9728 default. This register also 
> only covers received packets and not transmitted packets. A warning can 
> inform system administrators, but does not correct the issue. No interactions 
> from userspace cause the driver to write to PRTGL_SAH or issue the 0x0603 
> AdminQ command. Only a GLOBR reset will restore the value to its default 
> value. There is no obvious method to trigger a GLOBR reset from user space.
>
> To fix this, introduce the i40e_aq_set_mac_config() function, similar to the 
> one from the ice driver. Call this during early probe to ensure that the 
> device configuration matches driver expectation. Unlike E800, the E700 
> firmware also has a bit to control whether the MAC should append CRC data.
> It is on by default, but setting a 0 to this bit would disable CRC. The i40e 
> implementation must set this bit to ensure CRC will be appended by the MAC.
>
> In addition to the AQ command, instead of just checking the I40E_PRTGL_SAH 
> register, update its value to the 9728 default and write it back. This 
> ensures that the hardware is in the expected state, regardless of whether the 
> iPXE (or any other early boot driver) has modified this state.
>
> This is a better user experience, as we now fix the issues with larger MTU 
> instead of merely warning. It also aligns with the way the ice E800 series 
> driver works.
>
> A final note: The Fixes tag provided here is not strictly accurate. The issue 
> occurs as a result of an external entity (the iPXE intelxl driver), and this 
> is not a regression specifically caused by the mentioned change.
> However, I believe the original change to just warn about PRTGL_SAH being too 
> low was an insufficient fix.
>
> Fixes: 3a2c6ced90e1 ("i40e: Add a check to see if MFS is set")
> Link: 
> https://github.com/ipxe/ipxe/commit/6871a7de705b6f6a4046f0d19da9bcd689c3bc8e
> Signed-off-by: Jacob Keller <[email protected]>
> ---
> Changes in v3:
> - Don't disable CRC. Otherwise, Tx traffic will not be accepted
>  appropriately.
> - Link to v2: 
> https://lore.kernel.org/r/[email protected]
>
> Changes in v2:
> - Rewrite commit message with feedback from Paul Menzel.
> - Add missing initialization of cmd via libie_aq_raw().
> - Fix the Kdoc comment for i40e_aq_set_mac_config().
> - Move clarification of the Fixes tag to the commit message.
> - Link to v1: 
> https://lore.kernel.org/r/[email protected]
> ---
> drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h |  1 +  
> drivers/net/ethernet/intel/i40e/i40e_prototype.h  |  2 ++
> drivers/net/ethernet/intel/i40e/i40e_common.c     | 34 +++++++++++++++++++++++
> drivers/net/ethernet/intel/i40e/i40e_main.c       | 17 ++++++++----
> 4 files changed, 48 insertions(+), 6 deletions(-)
>

Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)

Reply via email to