Article View: linux.kernel.netdev
Article #8244Re: [PATCH v3 2/7] dt-bindings: net: dsa: mediatek,mt7530: add passthrough mode
From: Caleb James DeLisle
Date: Wed, 28 Oct 2026 13:52
Date: Wed, 28 Oct 2026 13:52
112 lines
13669 bytes
13669 bytes
On 28/10/2026 13:28, Andrew Lunn wrote: > On Wed, Oct 28, 2026 at 12:27:18PM +0100, Caleb James DeLisle wrote: >> On 28/10/2026 03:04, Andrew Lunn wrote: >>> On Wed, Oct 28, 2026 at 01:13:12AM +0000, Caleb James DeLisle wrote: >>>> MT7530 switches can be configured to blindly pass packets between their >>>> CPU/upstream port and a downstream DSA port, in particular, without >>>> altering the MediaTek DSA Tag on the packets. This mode is used in some >>>> integrations where an SoC integrated switch exists, but a more capable >>>> MCM switch is added to effectively replace it. >>>> >>>> Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr> >>>> Acked-by: Rob Herring (Arm) <robh@kernel.org> >>>> --- >>>> .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 7 +++++++ >>>> 1 file changed, 7 insertions(+) >>>> >>>> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml >>>> index 90b3582b7619..e29fb8693498 100644 >>>> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml >>>> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml >>>> @@ -73,6 +73,13 @@ description: | >>>> Check out example 7. >>>> + The MT7530 and MT7531 switches are capable of being operated in "passthrough" >>>> + mode. In this mode, traffic is unconditionally passed between the CPU port >>>> + and the DSA port which links to a second switch. To use passthrough mode, the >>>> + upstream switch is configured with a DSA link to the downstream switch. In >>>> + passthrough mode the upstream switch is restricted, with no other ports or >>>> + switch configuration allowed. >>>> + >>>> properties: >>>> compatible: >>>> oneOf: >>> Looking at just what is here, all i see is a comment. There is no new >>> property? Yet the subject is "add passthrough mode"? >> >> Indeed, I used "add" to mean "add documentation of". Per my reply on patch >> 3, I think we really prefer to avoid special properties and let this >> constitute (very) limited support for a switch hierarchy. >> >> If there's another verb you think makes a better commit line, I'd be happy >> to adjust. > [Goes and looks at mediatek,mt7530.yaml] > > So pass through is not an existing property. You are also not adding a > new property 'passthrough'. > > What you appear to be saying is that the MT7530 and MT7531 are hard > coded by the driver into pass through mode? So it is in effect a > property of the compatible? So maybe put this comment next to the > compatible? And make the subject/commit message talk about the > compatible being hard coded for pass through? Perhaps I should rephrase as follows: """ The MT7530 and MT7531 switches do not support switch hierarchies except in the case that a switch is configured with only one CPU port and one DSA port that links to a downstream switch. In this configuration, the upstream switch acts as a blind pass-through to the downstream switch. """ > Looking forward, what happens when somebody wants to use the switch as > a switch? Or you figure out how to do proper D in DSA? It becomes > messy because you need to add a property indicating the compatible > should actually be a switch? Full hierarchy (using DSA tag) is impossible because of what seems to be a hardware bug where switches don't distinguish themselves in the tag. However it is possible (albeit ugly) to enable ports on both switches providing the same numbered port isn't enabled on both switches. If somebody ever implements that, even if they remove this passthrough support, users of the current passthrough capability will not notice a difference because that will do the same as this. > > So maybe you really do need a property? > > But DT describes hardware, and pass through is configuration. So maybe > it should not be in DT at all, Maybe the driver needs to look at the > DT tree, figure out a port is used as a DSA port, and put the switch > into pass through all on its own? Once D in DSA is supported, the > addition ports become available, but no other changes are needed in > the DT blob? Previously there was no documentation regarding hierarchies, and any hierarchy would fail at runtime. I think a brief note that this one case of hierarchy is allowed is nice for the users, though it does bend the definition of "describing the hardware" so it could also be excluded. I may be persuaded either way. Thanks, Caleb > > Sorry, going around in circles, but hopefully it helps you think about > the big picture. > > Andrew
Technical Details
Message-ID:
<c6154519-98f4-46a7-ac30-076ebf588bab@cjdns.fr>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352867-linux-kernel-netdev=dewy.ruReferences:
<20261028011317.1557238-1-cjd@cjdns.fr> <20261028011317.1557238-3-cjd@cjdns.fr> <a031f089-0b96-4fc0-b878-6af13414524f@lunn.ch> <521b930f-0bf9-4373-bfbf-3e2570661ec9@cjdns.fr> <a566aad7-754c-4960-b018-4471a0068344@lunn.ch>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352867-linux-kernel-netdev=dewy.ru From: cjd@cjdns.fr (Caleb James DeLisle) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH v3 2/7] dt-bindings: net: dsa: mediatek,mt7530: add passthrough mode Date: Wed, 28 Oct 2026 14:52:44 +0100 Organization: Usenet Network Message-ID: <c6154519-98f4-46a7-ac30-076ebf588bab@cjdns.fr> References: <20261028011317.1557238-1-cjd@cjdns.fr> <20261028011317.1557238-3-cjd@cjdns.fr> <a031f089-0b96-4fc0-b878-6af13414524f@lunn.ch> <521b930f-0bf9-4373-bfbf-3e2570661ec9@cjdns.fr> <a566aad7-754c-4960-b018-4471a0068344@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="1782065"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:5XrFYKEtjrK4Jz5Z5f21jhU30RA= sha256:gwf+F4Eo9dsA7QAgV3SIE2UmJP1ldFi4+9Mz7/sRwrw= sha1:nohY/6RmOtbjZO4ahZYI44pHAbA= sha256:jNybAM15gAPGaB8ascScF+UPR7oboqQkQ5GY44ZNFVc= Content-Language: en-US List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 374B1125C36; Wed, 28 Oct 2026 16:56:18 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.95 X-Spam-Status: No, score=-1.95 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=cjdns.fr X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LUuh5DDlNyVO; Wed, 28 Oct 2026 16:56:15 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-352867-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cjdns.fr X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 7283F125C35; Wed, 28 Oct 2026 16:56:07 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id D778B2AC27; Wed, 28 Oct 2026 13:53:00 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793195580; b=3dK0yjjU4vgKSILnZ3SmR/MoAIJANC4JQr6u2duOq0jYYAJHE0ZzelxsqUlTi86Bv3ri l8aFmbHnQqAtBj7pHilyVQCERhFaC9N5kOCTL8id75TK2GbWckDyn4eXkNeTMHuMFatNr clE7AylgODCZ1CKh+0IJiPunCYYRMjzOtTLalNGiPx3ykw4KhbUvzbLUTOTrx71nh4aNz ywtEHY6WSw2+REPm2IEulUrIHCUiL2zXL4aVWvy1JHly5ivsR+GG8RacpxbKKn+mss3BW vfibPk0ldabrxI1mpHU0Z/wEvGn+LdKLx+d3fQrAvdPWtq9plvZTUQkFX1IqIjqIXhw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793195580; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: Message-ID:Date:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=sXikcPN/2u2jcqxK0ic3WXRLLLyeXrwW2xb+LwiQxXY=; b=jDLWhpjZphtpdh+y38oNHMZ+x1KHyIfFApP3sVg4rP0AyGMzS2fFFvH7l6PgwK/pvq5V 3x2S4tZxfBkYFkzlUYtgex0jtkOSbh1O5OEl+eXqtpjHlSNo1ZbPFbCMs7d/Q1rg0rOfN 9tt5ch+CRY8pWhwJkwlpftd9iNeWUT+GrGGioUBsaWXaXaX6w+Lxl3hemNkJhBEClnFX3 jV2Wxq6S7IsEFe0sLmZtF5Vh2waWjldK68mjtGZ9oEAipPxRsU8FBuG3CDE0gtG8vSHik 8MKAiKXLCOyvIhnCps+4dink/FI0b2/TFzGkOICFd9bruJCeWWHH03m19DeSyhxQ98A== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=cjdns.fr header.i=@cjdns.fr header.a=rsa-sha256 header.s=dkim header.b=SAvQBHOm; dmarc=pass header.from=cjdns.fr; spf=pass smtp.mailfrom=cjdns.fr; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E60DE60A2611; Wed, 28 Oct 2026 13:52:59 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=cjdns.fr header.i=@cjdns.fr header.a=rsa-sha256 header.s=dkim header.b=SAvQBHOm X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=5.135.140.105 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793195578; b=k9EFhSertI3Qe/eW4GpZqu8iYn2BXWlQ/557CJg8Y2gjP/kadbv+WhMSOdmv/LYOkMvs dIl907ay6X9PuaUGLP1Uk+twOobln18R+ifoXFxwxwutSSWnHwxqPtd7q/jA2THm1emSv I9WTXQYsJKlM9vjinZ09Q1Oo6+3jzNi3S88WnLEiYBYaWGMuAuAZZd+jKI0Zu2OlVCsQh Zpr1gea1eEAMo0eHm6pKM1XRSgq7zQSHW0kW29I9cW6diMQJHug0eSQaIPnoAipXwZ2Jg 6LCPKf0XtAI834Zecs1DtCbKv2hmvZRYmdi4C7wquP2EHpv9RROvU1wpq+dR1wVPFOQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793195578; h=DMARC-Filter:Received:DKIM-Signature:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=sXikcPN/2u2jcqxK0ic3WXRLLLyeXrwW2xb+LwiQxXY=; b=kPskJJ2cUXBE6Mn+/Km0Zxbxr9rsxs7kiW1QRwFIGQw3k+PNRq4ELRDfJ1buPWdvEsbS i9tHakRKLB7cbPUiyaTaq/Qall1XkxrTCDXcZTSiCUNT3vAHB4kC0SJX2mekvIrz63EGL +ngxcobcMipVUve16XoMs7F15RnHcteIJm8DPGUWKoTvU8acCihiLw+8CH+r1wFrG6NUA F9EsUWJj3F3JFrhIWzWXMhI9rXhxlOzATZf4Te4Sfpka2KeLesAtCB6GBExN5lvlAhgp6 OtcoDRQk+2ELr95RIsHM5KBFzYDkfMfIaIALp0O7WoE5+CQ/3o/sdsUSh44uaDhoKeA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=cjdns.fr; spf=pass smtp.mailfrom=cjdns.fr; dkim=pass header.d=cjdns.fr header.i=@cjdns.fr header.a=rsa-sha256 header.s=dkim header.b=SAvQBHOm; arc=none smtp.remote-ip=5.135.140.105 X-Received: from mail.cjdns.fr (mail.cjdns.fr [5.135.140.105]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B3167606A33A; Wed, 28 Oct 2026 13:52:57 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B3167606A33A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cjdns.fr X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cjdns.fr X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D80E215FD22; Wed, 28 Oct 2026 14:52:45 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cjdns.fr; s=dkim; t=1793195573; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=sXikcPN/2u2jcqxK0ic3WXRLLLyeXrwW2xb+LwiQxXY=; b=SAvQBHOmhiuyKvlXtM1AIKAj6CRqI92p5TarTfEUggze30z+GnbG565ZljxAgt9yHEC2dM uD5iBoqtnOoZOkDKm2IGdLODqoyp/e0jfOhfmpnSaikTs7D6Lenc1O1BbWgh87s/ma/Nyv vXgTMgY1W84l8PsDxj4I+9z1ztQDiCRxWVVACm3kSa6NgsrRAOPZ/Vhus041nsaRWalF1C DoCc3UPTBDy+cs4xKDWnbbmOkb4G/zZCOhvIYOmx+6EyMWoAV+2XadysA9Wdy/uPflREyO 0119GI7xKpC5Bf/FgQbIOizvjAHIjyaiWdtPRb7F8nPbA73yEHVZi50bJKd6Xg== X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-User-Agent: Mozilla Thunderbird Beta X-Cc: netdev@vger.kernel.org, olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, chester.a.unal@arinc9.com, daniel@makrotopia.org, linux@armlinux.org.uk, arinc.unal@arinc9.com, Landen.Chao@mediatek.com, dqfext@gmail.com, sean.wang@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, naseefkm@gmail.com, b.larsson@gmx.com X-In-Reply-To: <a566aad7-754c-4960-b018-4471a0068344@lunn.ch> X-Last-TLS-Session-Version: TLSv1.3