From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE7B6C05027 for ; Mon, 20 Feb 2023 13:52:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232481AbjBTNw6 (ORCPT ); Mon, 20 Feb 2023 08:52:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232483AbjBTNw5 (ORCPT ); Mon, 20 Feb 2023 08:52:57 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FF511ADE4 for ; Mon, 20 Feb 2023 05:52:56 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 45A33B80D1F for ; Mon, 20 Feb 2023 13:52:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B61ABC433D2; Mon, 20 Feb 2023 13:52:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1676901174; bh=7xMc3RJxFtWjrgtqHUhB50rds6MMaZPcxFpD72iq618=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2WR5NltUGnFJQNhnnB3+WMnfOryApoA8O2fimlj2L+p8gZ/iNfVt9jolI7gzeEBiB Lw9LekE2Ymqr67tazvgdOE3POb+xetL7P4nmnA29hWprTX/nmzr+LlF+Qp24gHRWim 1MsYfH32/V0qOAM/f/ZvF+VClnrye6dO4iqKVDeA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jason Xing , Alexander Duyck , Tony Nguyen , Chandan Kumar Rout Subject: [PATCH 5.15 56/83] i40e: add double of VLAN header when computing the max MTU Date: Mon, 20 Feb 2023 14:36:29 +0100 Message-Id: <20230220133555.625385726@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230220133553.669025851@linuxfoundation.org> References: <20230220133553.669025851@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jason Xing commit ce45ffb815e8e238f05de1630be3969b6bb15e4e upstream. Include the second VLAN HLEN into account when computing the maximum MTU size as other drivers do. Fixes: 0c8493d90b6b ("i40e: add XDP support for pass and drop actions") Signed-off-by: Jason Xing Reviewed-by: Alexander Duyck Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -2789,7 +2789,7 @@ static int i40e_change_mtu(struct net_de struct i40e_pf *pf = vsi->back; if (i40e_enabled_xdp_vsi(vsi)) { - int frame_size = new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; + int frame_size = new_mtu + I40E_PACKET_HDR_PAD; if (frame_size > i40e_max_xdp_frame_size(vsi)) return -EINVAL;