From: Jesse Brandeburg Date: Wed, 23 Apr 2014 04:50:05 +0000 (+0000) Subject: i40e: clamp jumbo frame size X-Git-Tag: firefly_0821_release~176^2~3765^2~66^2~8 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=61a46a4c079bc48f8b1c91d13436c71303dc1335;p=firefly-linux-kernel-4.4.55.git i40e: clamp jumbo frame size The driver was allowing the user to set larger size MTU than the hardware was being configured to support. The driver was already using VLAN_HLEN when setting the hardware max receivable frame size, so just add it to the netdev MTU set entry point as well. Change-ID: Ie20e2a35d04f8c411253e255bea79ca69aaeaea3 Signed-off-by: Jesse Brandeburg Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index cef3db44301e..cf67cf45a049 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -1698,7 +1698,7 @@ static void i40e_sync_filters_subtask(struct i40e_pf *pf) static int i40e_change_mtu(struct net_device *netdev, int new_mtu) { struct i40e_netdev_priv *np = netdev_priv(netdev); - int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN; + int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; struct i40e_vsi *vsi = np->vsi; /* MTU < 68 is an error and causes problems on some kernels */