On 8/28/2025 5:22 AM, Loktionov, Aleksandr wrote: > > >> -----Original Message----- >> From: Intel-wired-lan <[email protected]> On Behalf >> Of Jacob Keller >> Sent: Wednesday, August 27, 2025 11:18 PM >> 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 >> >> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c >> b/drivers/net/ethernet/intel/i40e/i40e_main.c >> index b83f823e4917..4796fdd0b966 100644 >> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c >> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c >> @@ -16045,13 +16045,18 @@ static int i40e_probe(struct pci_dev >> *pdev, const struct pci_device_id *ent) >> dev_dbg(&pf->pdev->dev, "get supported phy types ret = >> %pe last_status = %s\n", >> ERR_PTR(err), libie_aq_str(pf- >>> hw.aq.asq_last_status)); >> >> - /* make sure the MFS hasn't been set lower than the default >> */ >> #define MAX_FRAME_SIZE_DEFAULT 0x2600 > Can you consider re-name MAX_FRAME_SIZE_DEFAULT into > I40E_MAX_FRAME_SIZE_DEFAULT ? >
We could. Its not in a header file so shouldn't pollute other files
which is why I originally opted to keep the name as-is.
>> - val = FIELD_GET(I40E_PRTGL_SAH_MFS_MASK,
>> - rd32(&pf->hw, I40E_PRTGL_SAH));
>> - if (val < MAX_FRAME_SIZE_DEFAULT)
>> - dev_warn(&pdev->dev, "MFS for port %x (%d) has been set
>> below the default (%d)\n",
>> - pf->hw.port, val, MAX_FRAME_SIZE_DEFAULT);
>> +
>> + err = i40e_aq_set_mac_config(hw, MAX_FRAME_SIZE_DEFAULT,
>> NULL);
> Are you sure it's safe to use hw var here? Because old code used pf->hw.
>
Yes. I don't know why the original code used pf->hw, but we have a local
hw variable which points to the proper address already in this function.
>> + if (err) {
>> + dev_warn(&pdev->dev, "set mac config ret = %pe
>> last_status = %s\n",
>> + ERR_PTR(err), libie_aq_str(pf-
>>> hw.aq.asq_last_status));
>> + }
>> +
>> + /* Make sure the MFS is set to the expected value */
>> + val = rd32(hw, I40E_PRTGL_SAH);
>> + FIELD_MODIFY(I40E_PRTGL_SAH_MFS_MASK, &val,
>> MAX_FRAME_SIZE_DEFAULT);
>> + wr32(hw, I40E_PRTGL_SAH, val);
>>
>> /* Add a filter to drop all Flow control frames from any VSI
>> from being
>> * transmitted. By doing so we stop a malicious VF from
>> sending out
>>
>> ---
>> base-commit: ceb9515524046252c522b16f38881e8837ec0d91
>> change-id: 20250813-jk-fix-i40e-ice-pxe-9k-mtu-2b6d03621cd9
>>
>> Best regards,
>> --
>> Jacob Keller <[email protected]>
>
> Signed-off-by: Aleksandr Loktionov <[email protected]>
>
>
OpenPGP_signature.asc
Description: OpenPGP digital signature
