* [Intel-wired-lan] [net-next v2] i40e: Add a check to see if MFS is set
@ 2020-04-21 22:17 Jeff Kirsher
2020-04-22 18:49 ` Bowers, AndrewX
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Kirsher @ 2020-04-21 22:17 UTC (permalink / raw)
To: intel-wired-lan
From: Todd Fujinaka <todd.fujinaka@intel.com>
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>
---
v2: fix the math calculation on accessing the SAH register
drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 4c414208a22a..61311d1e772c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -15347,6 +15347,15 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
i40e_stat_str(&pf->hw, err),
i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
+ /* make sure the MFS hasn't been set lower than the default */
+#define MAX_FRAME_SIZE_DEFAULT 0x2600
+ for (i = 0; i < 4; i++) {
+ val = (rd32(&pf->hw, I40E_PRTGL_SAH + 0x4 * i) &
+ I40E_PRTGL_SAH_MFS_MASK) >> I40E_PRTGL_SAH_MFS_SHIFT;
+ if (val < MAX_FRAME_SIZE_DEFAULT)
+ dev_warn(&pdev->dev, "MFS for port %x has been set below the default: %x\n", i, 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
* PAUSE or PFC frames and potentially controlling traffic for other
--
2.25.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Intel-wired-lan] [net-next v2] i40e: Add a check to see if MFS is set
2020-04-21 22:17 [Intel-wired-lan] [net-next v2] i40e: Add a check to see if MFS is set Jeff Kirsher
@ 2020-04-22 18:49 ` Bowers, AndrewX
0 siblings, 0 replies; 2+ messages in thread
From: Bowers, AndrewX @ 2020-04-22 18:49 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Jeff Kirsher
Sent: Tuesday, April 21, 2020 3:18 PM
To: intel-wired-lan@lists.osuosl.org
Subject: [Intel-wired-lan] [net-next v2] i40e: Add a check to see if MFS is set
From: Todd Fujinaka <todd.fujinaka@intel.com>
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>
---
v2: fix the math calculation on accessing the SAH register
drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +++++++++
1 file changed, 9 insertions(+)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-22 18:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-21 22:17 [Intel-wired-lan] [net-next v2] i40e: Add a check to see if MFS is set Jeff Kirsher
2020-04-22 18:49 ` Bowers, AndrewX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox