From patchwork Wed Nov 23 09:57:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 24843 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2699147wrr; Wed, 23 Nov 2022 02:10:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf5ww2sVZZt/TPUuo3QGGLstY4mwbHS3lLg9ZrHKMKcVoggB4NhJOGsp5SNlS2yHJlBRlFsw X-Received: by 2002:a50:fe86:0:b0:462:a00e:1dab with SMTP id d6-20020a50fe86000000b00462a00e1dabmr24617682edt.135.1669198215755; Wed, 23 Nov 2022 02:10:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669198215; cv=none; d=google.com; s=arc-20160816; b=y5wOTdJNxes9SSnR8Ed7YqNH7xpaje3LChGVW2sU+y3hJIAHnex9zamo0iDL6dJO9w DVsFCQa2a2BFo/WPyB0Bmg7sTxsg7SCj8nSJ4+XsX/Zy7bzNFIYt2N9RuAWOTZN8nNaQ EQLatqyYO3XdNSSHysOk/9RfShlheRAhGASFKskOx4xo/leFrYII9gi3bSWVy6elBepH lhBlXctaivXpvE5aFfbKm0cwq2PsFbgkw8T6Zb+N+00gcxpkgn4gn+EJRxxGtgLcVYx8 v5cVmr7SNgh5Lmt2Z8z2UUvBTWkD4TQyZQMhWtBUI9894deKfDB2/riH66/+AjcgMBnu 4XkQ== 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=6uGEkYiiDNJdirEp88wlQrzHeOKWYnyUx0/Iz4Kx7zs=; b=Q5OLoNTKdzAAQmr5GzUEKdBEPt3fsKPYZSNWx5njYQ1oIHIiJJlNAdhOShCY8yuMtE nTdv8ljWEo1Qa5xId9QORC0lsjPLAyJEs0QdY3E5qgd0a2yXMAWhs2CO1yKEImEyWkYB ALL4xZ3p8C3j3BYffGLR7c59IJzz4DnJhYSAAWsN54/EGGYOoSD7wx7E3O6xi23JCxPv 201tncThMmrUTq0TswmJ11tPT77idR5YHrIccjhBLwm1KYKELzImaGX/4In98PxdMW/6 wf08sHLghz/IiMbpvYhH5wfi9uQz9K3cE7Pv9/FpT4TPk60ufP376h0KkZmUNKRVM9O6 oJBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=aH9ewe1z; 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 t20-20020a170906179400b007b27aecaf82si9563889eje.274.2022.11.23.02.09.51; Wed, 23 Nov 2022 02:10:15 -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=aH9ewe1z; 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 S237149AbiKWKJW (ORCPT + 99 others); Wed, 23 Nov 2022 05:09:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236856AbiKWKIo (ORCPT ); Wed, 23 Nov 2022 05:08:44 -0500 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8047AE2E; Wed, 23 Nov 2022 01:58:16 -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=6uGEkYiiDNJdirEp88wlQrzHeOKWYnyUx0/Iz4Kx7zs=; b=aH9ewe1zvFWVb4tslzb7s84Um4 d7ns8MepdyUaAsbWXaxhzralIQRPE2yKshe1mJQHAUbBYjwf4pRPXOg7AjSc4eMYWtUf8PP9+k5ux q4rkshNyg0LcPJ5s4z7P16utRWFLRIeidovjf4NK//Mu2Vn93gMxy5WUnqSFmRkmlDI4=; Received: from p200300daa7225c0894d890dd9e4669b3.dip0.t-ipconnect.de ([2003:da:a722:5c08:94d8:90dd:9e46:69b3] helo=Maecks.lan) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1oxmVv-003vzk-My; Wed, 23 Nov 2022 10:57:55 +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 1/5] net: ethernet: mtk_eth_soc: account for vlan in rx header length Date: Wed, 23 Nov 2022 10:57:50 +0100 Message-Id: <20221123095754.36821-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?1750281188401282040?= X-GMAIL-MSGID: =?utf-8?q?1750281188401282040?= 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 7ca806b4de10..a553265c10de 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 | \