All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Todd Fujinaka <todd.fujinaka@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	Andrew Bowers <andrewx.bowers@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 5/9] i40e: Add a check to see if MFS is set
Date: Mon, 22 Jun 2020 15:18:13 -0700	[thread overview]
Message-ID: <20200622221817.2287549-6-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20200622221817.2287549-1-jeffrey.t.kirsher@intel.com>

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>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 77a6be8ee112..2e454b0d71ee 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -15295,6 +15295,14 @@ 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
+	val = (rd32(&pf->hw, I40E_PRTGL_SAH) &
+	       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.26.2


  parent reply	other threads:[~2020-06-22 22:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22 22:18 [net-next 0/9][pull request] 40GbE Intel Wired LAN Driver Updates 2020-06-22 Jeff Kirsher
2020-06-22 22:18 ` [net-next 1/9] i40e: Move client header location Jeff Kirsher
2020-06-22 22:18 ` [net-next 2/9] i40e: remove unused defines Jeff Kirsher
2020-06-23  0:47   ` Shannon Nelson
2020-06-22 22:18 ` [net-next 3/9] i40e: make PF wait reset loop reliable Jeff Kirsher
2020-06-22 22:18 ` [net-next 4/9] i40e: detect and log info about pre-recovery mode Jeff Kirsher
2020-06-22 23:55   ` Jakub Kicinski
2020-06-23  0:18     ` Kirsher, Jeffrey T
2020-06-23  0:29       ` Jakub Kicinski
2020-06-23  0:41         ` Kirsher, Jeffrey T
2020-06-23  3:13     ` Kirsher, Jeffrey T
2020-06-23 20:40       ` Jakub Kicinski
2020-06-22 22:18 ` Jeff Kirsher [this message]
2020-06-22 22:18 ` [net-next 6/9] net/intel: remove driver versions from Intel drivers Jeff Kirsher
2020-06-22 22:18 ` [net-next 7/9] i40e: Add support for 5Gbps cards Jeff Kirsher
2020-06-22 22:18 ` [net-next 8/9] i40e: Remove scheduling while atomic possibility Jeff Kirsher
2020-06-22 22:18 ` [net-next 9/9] i40e: silence an UBSAN false positive Jeff Kirsher
2020-06-23  0:35   ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200622221817.2287549-6-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=andrewx.bowers@intel.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    --cc=todd.fujinaka@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.