Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp581068rdb; Thu, 2 Nov 2023 11:43:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGA2KViILh/0P6jHzm9anwwggWfrYAzV99xpbnnGVRATRGaqWQBiKG7+HfVXNZ9ZF5YIMJa X-Received: by 2002:a17:902:ec86:b0:1cc:e66:372e with SMTP id x6-20020a170902ec8600b001cc0e66372emr24590842plg.20.1698950627062; Thu, 02 Nov 2023 11:43:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698950627; cv=none; d=google.com; s=arc-20160816; b=je6YRovny3YyNGLkmrt6W0BjOqinOh0mSt92QSH99hgjY0BuoySDIn/ZGmxVyAzxwD izlp3CTt/mwz5LkDduQriG1ZqrKtD743WL3/8WUfSOOf+ZOXi0kIKiaUEbd6WVEF2iSB YuPhr0HRSs76J6tNtu3jsEWdFe3mOunuV13oRMIwLJwhTpO8NIzTFbGJECvsu1oWN+dJ kcVvhafu1hneDYdiKgWgHUiNKYw2yUYnx94om5zm+5enTBpnnzfJM1f3TeckBiFPuBVn P+95488fmFeVh9NR1ZxH8/L8pnKTygemGEOnipWNIHpzBwoRNuEZYJ3Eq/soOo9CIYOD HAWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=T3OCUKIJblthjBAmG3vt22DDyNrmU9MlYinLfZ0K7Xs=; fh=xa7VKFV/NA8TmgbJl8a8slu/ha2wzH2eeyF2BFrJ+VY=; b=lH1PbaHFAO8d5EMSfsnsIjjpNrn7K0gtSiRoyM6mTfeVnV3XQPfE6jEpqnAZSlXzW2 1CKskRdAcGZIaQx36WBGFpJCtEPyGwPVNWR4BXJnCVHEejXY4Ik9GOb2mUIKwcibK5Xh 2DiP7Jbf8LOkovShErC9Y4habRrxEoqA2nHSXeNm/WkMdKEkX+l7G8hefnaiDQZ7Ohl1 7zP7yHqKnxmyixitxtH/Y5Qdi+AOTkb0ozVtMrk12xgBkWlp6Ak58R9ep8AD/1o0hIgr mrenNWvxH5QyZ6xoXy63WrF+0yBs81/QZAxxLXKorpeE+8QvBWJcvyPl2qPPXj4QLG/M cLFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="b6Rpl/+9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id d11-20020a170902cecb00b001ca35cb0dbfsi90340plg.613.2023.11.02.11.43.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 11:43:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="b6Rpl/+9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id BF91B8227405; Thu, 2 Nov 2023 11:43:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377233AbjKBSnc (ORCPT + 99 others); Thu, 2 Nov 2023 14:43:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377207AbjKBSnb (ORCPT ); Thu, 2 Nov 2023 14:43:31 -0400 Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7987128; Thu, 2 Nov 2023 11:43:28 -0700 (PDT) Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-5a86b6391e9so15332427b3.0; Thu, 02 Nov 2023 11:43:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698950608; x=1699555408; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=T3OCUKIJblthjBAmG3vt22DDyNrmU9MlYinLfZ0K7Xs=; b=b6Rpl/+9pbDKsIkHONmDhCUAgzXGp2bbE1fEyseaqzBjEubY2BQpFpFYzdBQef3/2z DU1IP2hIQa42iuHDR0HMa4hgYeqigYGY32fi2akAqjXNxvQ0amgeDbAb+o4xi8wJFN7H TMgD2/BMvygwi8bZ01b7G1RG9Xcwms6GQHtLtPT7KBMM63XZlPave7+v6W7dVC4P7Gvx YU8B5JV3SqXVYPjh/vzCIRrv2RgJR2OQft6LQqEkq3Y4f/aisjJO7Cdwt2akN1A6o54M xxE2ZPE6BTvrzUIDWHUMdKN5Q6Y1sXhbGVr0JAwQodTFDrQ2OoEQcBHFTohdpKVPs8ev NOgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698950608; x=1699555408; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=T3OCUKIJblthjBAmG3vt22DDyNrmU9MlYinLfZ0K7Xs=; b=KDVqr5/oiXZnis6A5zUc1VgaCTYYtllXtp6b0NKMokoeuOmHwLxNY4I/SD7UI4MhIU udQY+bL+tS35rTn4QsUe6CSUTctX5Opok1hzEj/d+XYHMSHq796VzS2txuUBV3WMKr13 yzpvC30MGeZqp1drPStgNC/4MJ6g9ZHu1ajDzv8x8Cdlz1I5N7VVd9+KASD55WIOcM7f FvKvK7j5XPvlaDeFhH8iPpTH3hr16IVFkS9YTF5gIuZxXhtmfnXClYtcI84wHCMiijje adTyMKvyK1o9Yzdpy77jH+HXxj5CGItZA8OpY5cso39FnNDuktg3ohoA16DJgjM9NFNx hdig== X-Gm-Message-State: AOJu0YxnIYm1H9SdaqmJnoz8Kijw/P5x526+BOEQZmOfjlALFuHtH2Wf 6lcVtPamFYDfyEawqRGMpZM= X-Received: by 2002:a81:a115:0:b0:5a7:af86:8d3b with SMTP id y21-20020a81a115000000b005a7af868d3bmr575857ywg.37.1698950608056; Thu, 02 Nov 2023 11:43:28 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id t10-20020a0cea2a000000b0065b1f90ff8csm1671qvp.40.2023.11.02.11.43.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Nov 2023 11:43:27 -0700 (PDT) Message-ID: Date: Thu, 2 Nov 2023 11:43:25 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net v3] net: dsa: tag_rtl4_a: Bump min packet size Content-Language: en-US To: Linus Walleij , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Luiz Angelo Daros de Luca Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231031-fix-rtl8366rb-v3-1-04dfc4e7d90e@linaro.org> From: Florian Fainelli In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 02 Nov 2023 11:43:44 -0700 (PDT) On 11/1/23 13:18, Linus Walleij wrote: > On Tue, Oct 31, 2023 at 11:45 PM Linus Walleij wrote: > >> It was reported that the "LuCI" web UI was not working properly >> with a device using the RTL8366RB switch. Disabling the egress >> port tagging code made the switch work again, but this is not >> a good solution as we want to be able to direct traffic to a >> certain port. > > Luiz is not seeing this on his ethernet controller so: > > pw-bot: cr > > (I've seen Vladmir do this, I don't know what it means, but seems > to be how to hold back patches.) Looking at drivers/net/ethernet/cortina/gemini.c, should not we account for when the MAC is used as a conduit and include the right amount of "MTU" bytes? Something like this (compile tested only): diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c index 5423fe26b4ef..5143f3734c3b 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -1151,6 +1152,13 @@ static int gmac_map_tx_bufs(struct net_device *netdev, struct sk_buff *skb, if (skb->protocol == htons(ETH_P_8021Q)) mtu += VLAN_HLEN; +#if IS_ENABLED(CONFIG_NET_DSA) + if (netdev_uses_dsa(netdev)) { + const struct dsa_device_ops *ops = skb->dev->dsa_ptr->tag_ops; + mtu += ops->needed_headroom; + } +#endif + word1 = skb->len; word3 = SOF_BIT; Also, as a separate check, might be worth annotating the various descriptor words with __le32 and appropriate le32_to_cpu() and cpu_to_le32() accessors for each of those fields. -- Florian