Skip to content

Commit 3a2c6ce

Browse files
Todd FujinakaJeff Kirsher
authored andcommitted
i40e: Add a check to see if MFS is set
A customer was chain-booting to provision his systems and one of the steps was setting MFS. MFS isn't cleared by normal warm reboots (clearing requires a GLOBR) and there was no indication of why Jumbo Frame receives were failing. Add a warning if MFS is set to anything lower than the default. Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent fffeedd commit 3a2c6ce

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15290,6 +15290,14 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1529015290
i40e_stat_str(&pf->hw, err),
1529115291
i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
1529215292

15293+
/* make sure the MFS hasn't been set lower than the default */
15294+
#define MAX_FRAME_SIZE_DEFAULT 0x2600
15295+
val = (rd32(&pf->hw, I40E_PRTGL_SAH) &
15296+
I40E_PRTGL_SAH_MFS_MASK) >> I40E_PRTGL_SAH_MFS_SHIFT;
15297+
if (val < MAX_FRAME_SIZE_DEFAULT)
15298+
dev_warn(&pdev->dev, "MFS for port %x has been set below the default: %x\n",
15299+
i, val);
15300+
1529315301
/* Add a filter to drop all Flow control frames from any VSI from being
1529415302
* transmitted. By doing so we stop a malicious VF from sending out
1529515303
* PAUSE or PFC frames and potentially controlling traffic for other

0 commit comments

Comments
 (0)