From patchwork Tue Dec 27 14:08:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 36904 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1408488wrt; Tue, 27 Dec 2022 06:09:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXuuX4i/vhvItXDY8ct9R1QEOo2wYNOIEN7rY8nTQYuB7JJUperJfoaqwHLuPHN6YsZFoP7O X-Received: by 2002:a05:6a00:d6f:b0:581:4ce0:e5bf with SMTP id n47-20020a056a000d6f00b005814ce0e5bfmr6433577pfv.26.1672150140258; Tue, 27 Dec 2022 06:09:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672150140; cv=none; d=google.com; s=arc-20160816; b=pc0qI7badXSCLSQTvE2GVtjdnEDaM9aWnYueE1OgZGK1U+1sL9AeaPWMfkAV2Q7rOo 0iZYuL0KFb+GZrJzhX8IS9X4ntN0TQ/QYd4DUV2kc+popZwju4zdJObcfJ4PgP/A/NYx jzFBBHIXy6IgG5N3TT15bVeLYp2ZpZQNG4Vmuy4HBqrMk36Hi/C/Tg/ppEbmapaGysoD pGKdJ1DXGgCn79sT2H/qHAO1tAf8D4zB1PFBxdzEekgAU1tUFkb7fD4ADyj3O9N4E+KD p3C8K90ESo0lwEmcONYuOFSk/TsKPifUgxmRgX9yIGPeNm2ule3SYgQDjJGlPNvtwnsj jnZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=uVR2uPfM2wpTa8jMNvsapEg7hJdOqwYrYDayzI7tjh8=; b=tFfVD02A07AhJL3mwD8wMWuKf7mNrCgYqyjUleV9AgQ7k7wOyVp5RNCLKtL5jSbOMG BgV205Z2bLCHqswxbJFqjg67FLZvMcSLPCr7YCi7YiNso9pc5Dc3VY+rPBCiTlxxAw+i sb6Y1eqRcB7Yh9WagGIgDG8o45Bp+ctSN0GUeBH0g0mc0wp7sME1aMp1M2LAULxBacnS XQFENiU/w1Yh37+1Wq9TAMj3qId5LecOhATAz7iIrnW78lxD80/7dWKmpMfficTsvNM2 vRIQj9BVUguogOepBzHaSuVzFl6eTW4muQhCYbb0Ta4z+Iy8REc0ecHqva7AXDVQJNOP jm6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=P8VuvCqw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 73-20020a62144c000000b0058167c50a3asi2035911pfu.142.2022.12.27.06.08.48; Tue, 27 Dec 2022 06:09:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=P8VuvCqw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231289AbiL0OI2 (ORCPT + 99 others); Tue, 27 Dec 2022 09:08:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbiL0OIW (ORCPT ); Tue, 27 Dec 2022 09:08:22 -0500 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E883662CD; Tue, 27 Dec 2022 06:08:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=uVR2uPfM2wpTa8jMNvsapEg7hJdOqwYrYDayzI7tjh8=; b=P8VuvCqwvpww21pEHzsjSlOyCc nDjtBtNnBCVJwgYUjnHNbRVJXNxPy7Ct3vgJkDPi99SkqAK0/B07Rzyxki/gU5Dfa7DwOO+niz5pL yU0SLnceA4BeHQ3tRQoXdIdYgU7W8JF8hodHTAFiRC8TZVFOVRKOY+bnA3pxgC3RJAjo=; Received: from p200300daa720fc040c81ba64b0a9b1e5.dip0.t-ipconnect.de ([2003:da:a720:fc04:c81:ba64:b0a9:b1e5] helo=Maecks.lan) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1pAAci-00C3RB-BH; Tue, 27 Dec 2022 15:08:08 +0100 From: Felix Fietkau To: netdev@vger.kernel.org, John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger Cc: Vladimir Oltean , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net v2 1/5] net: ethernet: mtk_eth_soc: account for vlan in rx header length Date: Tue, 27 Dec 2022 15:08:03 +0100 Message-Id: <20221227140807.48413-1-nbd@nbd.name> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753376505119992711?= X-GMAIL-MSGID: =?utf-8?q?1753376505119992711?= The network stack assumes that devices can handle an extra VLAN tag without increasing the MTU Reviewed-by: Vladimir Oltean Signed-off-by: Felix Fietkau --- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h index ee06406e9ff6..628ed72911bd 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h @@ -34,7 +34,7 @@ #define MTK_QDMA_RING_SIZE 2048 #define MTK_DMA_SIZE 512 #define MTK_MAC_COUNT 2 -#define MTK_RX_ETH_HLEN (ETH_HLEN + ETH_FCS_LEN) +#define MTK_RX_ETH_HLEN (VLAN_ETH_HLEN + ETH_FCS_LEN) #define MTK_RX_HLEN (NET_SKB_PAD + MTK_RX_ETH_HLEN + NET_IP_ALIGN) #define MTK_DMA_DUMMY_DESC 0xffffffff #define MTK_DEFAULT_MSG_ENABLE (NETIF_MSG_DRV | \