]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ixgbe: Fix SR-IOV MTU warning
authorAlexander Duyck <alexander.h.duyck@intel.com>
Wed, 9 Jan 2013 08:50:42 +0000 (08:50 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 5 Feb 2013 09:44:27 +0000 (01:44 -0800)
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
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index 2a61889143a5500c174037c5b2cc3454fd7e31f3..d268c7b222c764f5b6fc78848ef2bbbaa9e31607 100644 (file)
@@ -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 */
 
index ef9cb0ab43141df8f9a577bf13bd2824b7cb9f58..396e280c437353059392897fdc09590701ba2420 100644 (file)
@@ -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);