Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2412610rdh; Sun, 29 Oct 2023 15:16:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFCBvtQ1Ifwqx30ThSxkkRcixS9BtW4AyI84o2y3yf47vn1z4TK7cNXAGYMA8c2Gkk1EDpO X-Received: by 2002:a17:903:2347:b0:1c6:25b2:b71a with SMTP id c7-20020a170903234700b001c625b2b71amr10335526plh.2.1698617794229; Sun, 29 Oct 2023 15:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698617794; cv=none; d=google.com; s=arc-20160816; b=yKD/QYBT9/M+ZqEynDssIn/lia3JK9rDdmj0Q+c7Z5JKD4Rti99fYVY7VmHE9WfKG/ Crgt3dak3h3DNSXVFk3MZYWTl99uSJwqhc3cFv15kc+T6wqWUVHgLe72q6w6Rp7DEDwz tBr8gkuE8g0oOciBgUa9ZlbyMw2Nb1sJrd6172tMEU/0PTcbNnJKM90qUiHz79HMbx27 qt2jTiPxtc/ecnqG6H8Faxuf+1++8tmG5epDheBR4SjY2GqqM5IOHxH70Dc+DCH2uQaC pZx5L6JdDs+W9covoVk6j5sYy9WOqUji+t6i3O6MGUYE3gsKSBySdK+WX11fYPSu0gtL vCXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=4DHjqrde8ErThPTqoMnEMyFAJvtH9637SxQ0kWsDcbc=; fh=UBHrOM9PBQwSFqXndSIbT7vqCo9eKRuWyjdhgGwLerM=; b=na+Qbmxmv33ukdcRqYQa/YVV5UnYakchR63sTKeJM+KH+ddYg+Qwou4OBNgWymoiyb KIb+CdUPMkrEBr5/MOqVzqbsQXSFYx3AXp9f3hZ6GZqMl6TK8VjB08jr24tjeZjJU+W6 nAZ0rNzEpPWoq/OhVbwOeQ8oQRh9AfhjDl7g+TCXQrbEXT2ms09qCSQyUyS8ArPhwm3j ayt0YDISMHNQ9Khriy43oz+yEgeJqh+YbJjNjRsBroCRjvBqK8Lwc+DBhQS8WBU7vM6U SZ7PyVNzjJDRAz26Iv2Dtdx3l2l5+5YyHsjrD2ViYXxHhXnl/EipNYltOpei8fle0WkO Cmsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cnu9R1Hu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id o17-20020a170902d4d100b001c9cd55e303si4142550plg.589.2023.10.29.15.16.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 15:16:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cnu9R1Hu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id DF819808BD88; Sun, 29 Oct 2023 15:16:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230367AbjJ2WQQ (ORCPT + 99 others); Sun, 29 Oct 2023 18:16:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbjJ2WQO (ORCPT ); Sun, 29 Oct 2023 18:16:14 -0400 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7728BBD for ; Sun, 29 Oct 2023 15:16:11 -0700 (PDT) Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-d9c66e70ebdso3075621276.2 for ; Sun, 29 Oct 2023 15:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698617770; x=1699222570; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4DHjqrde8ErThPTqoMnEMyFAJvtH9637SxQ0kWsDcbc=; b=cnu9R1Hunif6hkx5vZzhlV3YK2KmVCIWJOkI6CzrPQpSHK7PCPBYIe81RwPFeYsSuE dUHZIW8IzlV4y2Eu4tNQwxek4iXGTHEXhKRcFW+VCBBu6LMJoOGrPmmoN9C3kZHVCELD g60CmbAJgPyZapM3aO5+8lkW+4vYnY3Rpvy0QeDoucK3wov24x9ppE5Ue2pP88Oklk4N 66YGRp7I6Vd1wPWJ1h93sM0ll4IKajJ/GrRrD7K2fbwh4tLGf4V1ISqID79ntZRyfCRU WMq8x6T0XnIjaiNaSH0V5kRcS5bfKS3sjK+nz2aA6NOeeVpr4UibOAa/nSsQ/OkgUj1F ZH6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698617770; x=1699222570; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4DHjqrde8ErThPTqoMnEMyFAJvtH9637SxQ0kWsDcbc=; b=MJxXCBxcKkNXZbrE/cXBHYK3AEg5aDHAu56QFIZANCXbZUSDY/mDr68aTNoSD4JjMs HyFnNR3Q+j9rkkbffWDqYHiUs/bWERgPYrKGIuMf9FD9+e707KhhR1aRkKSxkTdCImj2 XOYDqcyzDeoyZ8vYSWvY457Lnua2olDuMFZNsebLG+cTT+Cy57w7/FOCjs3h4ND+8jfH NmXy7PBXFzrNeY0mw8l5XAYYYH7MU8HpxF/x7OKDAwa0R6ABEXfhpzkjb9/PYqi2nM6j oOnpyNLVrNEfAsxhJOANj5xdJ0a7i8Wc6hJrpYGD3ez8vhNZwFJSF8ylJj4i2Y3yc8PO EgcA== X-Gm-Message-State: AOJu0YwRDzaUrt9WC1bGgLaA/jzWloTndcsPFoyhB7o5jANCz87c9/Ow ccmc6m9mV/POnOUqm+BYmjHFgdrCgzRmJvW8t3/pug== X-Received: by 2002:a25:ab32:0:b0:d9b:4a2c:7a73 with SMTP id u47-20020a25ab32000000b00d9b4a2c7a73mr7311315ybi.61.1698617770419; Sun, 29 Oct 2023 15:16:10 -0700 (PDT) MIME-Version: 1.0 References: <20231027-fix-rtl8366rb-v1-1-d565d905535a@linaro.org> <20231028220402.gdsynephzfkpvk4m@skbuf> In-Reply-To: <20231028220402.gdsynephzfkpvk4m@skbuf> From: Linus Walleij Date: Sun, 29 Oct 2023 23:15:58 +0100 Message-ID: Subject: Re: [PATCH] dsa: tag_rtl4_a: Bump min packet size To: Vladimir Oltean Cc: DENG Qingfang , Mauri Sandberg , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NUMERIC_HTTP_ADDR,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Sun, 29 Oct 2023 15:16:28 -0700 (PDT) Hi Vladimir, first: THANKS, because you ALWAYS ask the *right* questions, and I quickly get closer to the real solution! On Sun, Oct 29, 2023 at 12:04=E2=80=AFAM Vladimir Oltean wrote: > On Fri, Oct 27, 2023 at 10:21:39PM +0200, 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. > > > > It turns out that sometimes, but not always, small packets are > > dropped by the switch for no reason. > > "For no reason" is a technical statement which means "an unspecific/incon= clusive > drop reason in the ethtool -S output on the conduit interface (which also > shows the hardware counters of the CPU port", or is it just a figure of > speech? If just a figure of speech, could you please determine which > counter gets incremented when the switch drops packets? I ran ethtool -S on the switch port before and after trying to access the w= eb UI (LuCI) on the router with the chip, i.e. putting http://192.168.1.1 into the address bar of a browser and hitting enter three times. Then I ran diff -ur on the two outputs (before and after) and get this disturbing and symmetric stat: - Dot1dTpPortInDiscards: 0 + Dot1dTpPortInDiscards: 3 (Counters defined in drivers/net/dsa/realtek/rtl8366rb.c) > What user port is being targeted when the switch drops packets? Any user > port, or just specific ones? I tried on lan0, lan1, lan2 and lan3 (DSA ports 0,1,2,3): same result. On each of the ports, the same Dot1dTpPortInDiscards counter goes up. > What protocol headers do those packets that are dropped have? HTTP > Is it size > that they have in common, I wonder (given that you say that small > packets are not always dropped), or is it something else? I got it wrong, it's big packets getting dropped, not small ones... :( Some tcpdump:ing gives at hand that the problem is that the httpd is sending 1500 byte packages. Anything over 1496 fails in ping tests. 1496 is suspiciously much 1500 - DSA tag size. However the MTU of the parent ethernet is bumped nicely to 1504 and the device MTU is set up to accomodate it as well. Modifying the patch to just pad out packets >=3D 1496 bytes solves the problem in a better way, but maybe that is not the last thing we try here... I'll resend the patch with more elaborate commit log and test description in the commit. > > Fixes: 0e90dfa7a8d8 ("net: dsa: tag_rtl4_a: Fix egress tags") > > Have you actually checked out this sha1sum and confirmed that the packet > drop can be reproduced there? Ideally you could also go back to a bit > earlier, to commit 9eb8bc593a5e ("net: dsa: tag_rtl4_a: fix egress tags") > (this is a different commit from Qingfang with the same description) and > test on user port 0 only? Yes it should be an earlier commit indeed. I'll fix! Yours, Linus Walleij