]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ice: Fix the calculation of ICE_MAX_MTU
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Fri, 8 Feb 2019 20:50:29 +0000 (12:50 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 25 Feb 2019 16:56:01 +0000 (08:56 -0800)
Currently ICE_MAX_MTU subtracts only ETH_HLEN from max frame size and
adds ETH_FCS_LEN and VLAN_HLEN, which is not what was intended.
The ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN expression should be surrounded
with parentheses.

Wrap mentioned expression and take into account VLAN double tagging.

Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice.h

index 55944e08955892faf9cc8a7167b8f9dd81d4faaf..89440775aea12df34d1fb43978be83e789aaec00 100644 (file)
@@ -83,7 +83,7 @@ extern const char ice_drv_ver[];
 #define ICE_DFLT_NETIF_M (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_LINK)
 
 #define ICE_MAX_MTU    (ICE_AQ_SET_MAC_FRAME_SIZE_MAX - \
-                        ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN)
+                       (ETH_HLEN + ETH_FCS_LEN + (VLAN_HLEN * 2)))
 
 #define ICE_UP_TABLE_TRANSLATE(val, i) \
                (((val) << ICE_AQ_VSI_UP_TABLE_UP##i##_S) & \