Skip to content

Commit ce45ffb

Browse files
JasonXinganguy11
authored andcommitted
i40e: add double of VLAN header when computing the max MTU
Include the second VLAN HLEN into account when computing the maximum MTU size as other drivers do. Fixes: 0c8493d ("i40e: add XDP support for pass and drop actions") Signed-off-by: Jason Xing <[email protected]> Reviewed-by: Alexander Duyck <[email protected]> Tested-by: Chandan Kumar Rout <[email protected]> (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
1 parent f9cd6a4 commit ce45ffb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2921,7 +2921,7 @@ static int i40e_change_mtu(struct net_device *netdev, int new_mtu)
29212921
struct i40e_pf *pf = vsi->back;
29222922

29232923
if (i40e_enabled_xdp_vsi(vsi)) {
2924-
int frame_size = new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN;
2924+
int frame_size = new_mtu + I40E_PACKET_HDR_PAD;
29252925

29262926
if (frame_size > i40e_max_xdp_frame_size(vsi))
29272927
return -EINVAL;

0 commit comments

Comments
 (0)