Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2481533rwb; Mon, 7 Nov 2022 13:56:47 -0800 (PST) X-Google-Smtp-Source: AMsMyM5yhkuXoWPKTE9yTwNgRO8jMQD4TTeD/63+wyPtz1Dc4aNl1RAiQ8Mhc72tw8RkLa3t/fvT X-Received: by 2002:a17:903:32c8:b0:187:2718:5313 with SMTP id i8-20020a17090332c800b0018727185313mr40603604plr.82.1667858206946; Mon, 07 Nov 2022 13:56:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667858206; cv=none; d=google.com; s=arc-20160816; b=PCTjw3d6/7PpfQ8sgpmkXh9R5Tdi7fcNA+xsGs9ASQBHdL8CJ8mxpPdnuMS4PafLpo Osd4TJzANKnhsLsvLISYf9N5qxaB+blOIubVfrzir/hZgVJAbd1EUWX1OttwMouGqAE7 y5SKmc+DZ0clUYLq9X0KAiSQUNtPDdQfigVfUz1/VHlYeRb9/4gqI3x6ycuPZOheI6Gg TEcbvwS05YTyNN/475OUglEZ0c/i7XPH/p/zwig9YjLZIvnbWh1xlZVkGmNUsBvNHknV kgdRln2Ur1nQhaUo8/23kskF3dVxEM+zleAvK5NVgtUKN/lo/11m+kWzkrdWA9lL6MTq sI6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aZz5lIxuDB7I0z1jD8r02lw8MXfBIpXPRDPu83kXprE=; b=Ps3ABj6SUZSzRGBZM05OS7tDiP9SdMrtENAOUAXLHsw6olRX2daAOjg13tlUjp3+cN TzCsqbMiMz5sviJKdf+UycuecGqPz6GmSFuI4fRk0rXE/tCoCoepvs0xZNtKnKZIJVqy p8/ILD4fdrJQv1pYavOn8GkOl47VZ19R6CZdNE60VTJLxRNnbNLXwQufNT1RpBIJPVtz /uAl50wUs9XclAQ7mR/NH2OaopLm3YYgG4QrSpQ2J+lv3M9kDB3Bxs5pKDNOMqG4CEzX MegMeOgcl9UrqWtBAoqqpQGrvP3Kw7rkWCEMxsY6+TTIHdeHuJyu1j2YaAu4Q+oGOLZF tY4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lcXa8yD0; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020a170902ee8b00b001781f860a6dsi10191415pld.228.2022.11.07.13.56.34; Mon, 07 Nov 2022 13:56:46 -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=pass header.i=@gmail.com header.s=20210112 header.b=lcXa8yD0; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233088AbiKGU4E (ORCPT + 92 others); Mon, 7 Nov 2022 15:56:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232191AbiKGU4C (ORCPT ); Mon, 7 Nov 2022 15:56:02 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C38081098; Mon, 7 Nov 2022 12:56:01 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id a13so19597921edj.0; Mon, 07 Nov 2022 12:56:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=aZz5lIxuDB7I0z1jD8r02lw8MXfBIpXPRDPu83kXprE=; b=lcXa8yD0SgTUPQeGlv227tDRMrB5NnfEInO0NrD4HykU0N5ueMLTDPxXEpe4pJTJY5 +wK/aRIZRTyxwXuzqNVBd8eKLBMBlIyI/JgcV3eN5CfMcZaVcgbh1cmGfJ4qY6CMN1pS y/WPX1gnhv8dezjEePLyT+6MI5cREwiKs0FzVshIW0A2tUUuBECTwEfygyBjw0EIzIL7 bfOsiCsZuwm/C0dTUElfowYYH8InVD+HVNS3XC3piOewEAbrSbFNpOExugQl+Ah8DPmh pGple9hGCOZkPNH3sAjqfQjV9Zgi8FmSPGJWBpDRSz8UD13WzNVlwGZoXX9OoGjyNQ0W ldww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aZz5lIxuDB7I0z1jD8r02lw8MXfBIpXPRDPu83kXprE=; b=tqrH1ILb3YYK/CddF403I/7JhZRp7qR99lwwxmryHEUgflOD5Oj3qA21WfphVLCxnS 9ZBYx84fxa5hCfy6SCvM+AZjGk8nVnUe7CczTV/kcz2a3n7QYI+6jqMXEhcH5tA7jDkc LFT+ghUNwMCkpcsQdcCEbgE5zvS/q4FYLCdmDzHL5KXKyrnK0mCV0V2k1/5uAGytvHy6 4wLNPDCHlY0SZDegw/bPWfuLwdvxbcG/zkHE4XSkkh5gTyXfTCxPKNIrB2vN3brxa2oI OT6TPH530/2A8gZYvn3O0AFevqZOmu3mlp1eyq13ZGrrw8QBGe6CJ24TaAcQ/KUlr7Qx bMMg== X-Gm-Message-State: ACrzQf22NhMLBkkDcqkzmlMlIG8utC9fuFst6DpojgcXUJT5XU+1QYdV ClLf2Zu5gRZSTVZLKvcLhIE= X-Received: by 2002:a50:ef06:0:b0:463:2605:d24d with SMTP id m6-20020a50ef06000000b004632605d24dmr47036181eds.43.1667854560277; Mon, 07 Nov 2022 12:56:00 -0800 (PST) Received: from skbuf ([188.27.184.197]) by smtp.gmail.com with ESMTPSA id g18-20020a17090604d200b0073dc5bb7c32sm3882261eja.64.2022.11.07.12.55.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 12:55:59 -0800 (PST) Date: Mon, 7 Nov 2022 22:55:53 +0200 From: Vladimir Oltean To: Felix Fietkau Cc: netdev@vger.kernel.org, John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/14] net: ethernet: mtk_eth_soc: account for vlan in rx header length Message-ID: <20221107205553.cnydzeh3tmilqblx@skbuf> References: <20221107185452.90711-1-nbd@nbd.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221107185452.90711-1-nbd@nbd.name> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On Mon, Nov 07, 2022 at 07:54:39PM +0100, Felix Fietkau wrote: > This may be needed for correct MTU settings on devices using DSA > > 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 589f27ddc401..dcf2a0d5da33 100644 > --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h > +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h > @@ -29,7 +29,7 @@ > #define MTK_TX_DMA_BUF_LEN_V2 0xffff > #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_HLEN + ETH_FCS_LEN) Commit title says account for VLAN (VLAN_HLEN, 4 bytes), code says add VLAN_ETH_HLEN (18) more bytes. Also, why is DSA mentioned in the commit message? Is accounting for VLAN hlen not needed if DSA is not used? Why? > #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 | \ > -- > 2.38.1 >