netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Alexander Duyck <alexander.h.duyck@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 15/15] ixgbe: Fix SR-IOV MTU warning
Date: Tue,  5 Feb 2013 02:02:28 -0800	[thread overview]
Message-ID: <1360058548-18158-16-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1360058548-18158-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Alexander Duyck <alexander.h.duyck@intel.com>

This change corrects the fact that we were using 1522 to test for the
max frame size in ixgbe_change_mtu and 1518 in ixgbe_set_vf_lpe.  The
difference was the addition of VLAN_HLEN which we only need to add in the case
of computing a buffer size, but not a filter size.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Sibai Li <Sibai.li@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe.h      | 2 --
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index 2a61889..d268c7b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -92,8 +92,6 @@
  */
 #define IXGBE_RX_HDR_SIZE IXGBE_RXBUFFER_256
 
-#define MAXIMUM_ETHERNET_VLAN_SIZE (ETH_FRAME_LEN + ETH_FCS_LEN + VLAN_HLEN)
-
 /* How many Rx Buffers do we bundle into one write to the hardware ? */
 #define IXGBE_RX_BUFFER_WRITE	16	/* Must be power of 2 */
 
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index ef9cb0a..396e280 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4869,7 +4869,7 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)
 	 */
 	if ((adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) &&
 	    (adapter->hw.mac.type == ixgbe_mac_82599EB) &&
-	    (max_frame > MAXIMUM_ETHERNET_VLAN_SIZE))
+	    (max_frame > (ETH_FRAME_LEN + ETH_FCS_LEN)))
 		e_warn(probe, "Setting MTU > 1500 will disable legacy VFs\n");
 
 	e_info(probe, "changing MTU from %d to %d\n", netdev->mtu, new_mtu);
-- 
1.7.11.7

  parent reply	other threads:[~2013-02-05 10:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05 10:02 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2013.02.05 Jeff Kirsher
2013-02-05 10:02 ` [net-next 01/15] e1000e: cosmetic move of #defines and prototypes to the new 82571.h Jeff Kirsher
2013-02-05 10:02 ` [net-next 02/15] e1000e: cosmetic move of #defines to the new 80003es2lan.h Jeff Kirsher
2013-02-05 10:02 ` [net-next 03/15] e1000e: cosmetic move of #defines and prototypes to the new ich8lan.h Jeff Kirsher
2013-02-05 10:02 ` [net-next 04/15] e1000e: cosmetic move of function prototypes to the new mac.h Jeff Kirsher
2013-02-05 10:02 ` [net-next 05/15] e1000e: cosmetic move of #defines and function prototypes to the new phy.h Jeff Kirsher
2013-02-05 10:02 ` [net-next 06/15] e1000e: cosmetic move of #defines and function prototypes to the new nvm.h Jeff Kirsher
2013-02-05 10:02 ` [net-next 07/15] e1000e: cosmetic move of #defines and prototypes to the new manage.h Jeff Kirsher
2013-02-05 10:02 ` [net-next 08/15] e1000e: convert enums of register offsets and move #defines to regs.h Jeff Kirsher
2013-02-05 10:02 ` [net-next 09/15] e1000e: cleanup checkpatch braces checks Jeff Kirsher
2013-02-05 10:02 ` [net-next 10/15] ixgbe: allow reading of SFF-8472 data over i2c Jeff Kirsher
2013-02-05 10:02 ` [net-next 11/15] ixgbe: fix potential null dereference Jeff Kirsher
2013-02-05 10:02 ` [net-next 12/15] ixgbe: fix return values and memcpy parameters to eliminate Smatch warnings Jeff Kirsher
2013-02-05 10:02 ` [net-next 13/15] ixgbe: update date to 2013 Jeff Kirsher
2013-02-05 10:02 ` [net-next 14/15] ixgbe: Replace rmb in Tx cleanup with read_barrier_depends Jeff Kirsher
2013-02-05 10:02 ` Jeff Kirsher [this message]
2013-02-05 19:56 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2013.02.05 David Miller

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=1360058548-18158-16-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).