🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #8104

Re: [PATCH v3 3/7] net: dsa: mediatek: add support for passthrough mode

#8104
From: Andrew Lunn
Date: Wed, 28 Oct 2026 02:15
35 lines
9449 bytes
> @@ -199,6 +199,9 @@ static void mt7530_port_fast_age(struct dsa_switch *ds, int port)
>  	u32 val;
>  	int ret;
>  
> +	if (priv->is_passthrough)
> +		return;
> +
>  	mutex_lock(&priv->reg_mutex);
>  
>  	/* Flush all non-static MAC address entries */
> @@ -970,6 +973,9 @@ mt7530_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)
>  	unsigned int age_count;
>  	unsigned int age_unit;
>  
> +	if (priv->is_passthrough)
> +		return 0;
> +
> @@ -1386,11 +1446,14 @@ mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
>  	int length;
>  	u32 val;
>  
> +	if (priv->is_passthrough)
> +		return 0;
> +

What is actually left?

Is there sufficient code reuse that this makes sense?

Would it be simpler to have a much simpler DSA driver just for pass
through? Or the mt7530 driver has a second dsa_switch_ops instance
with all these functions set to NULL?

     Andrew
Technical Details
Message-ID: <734d4f06-26af-4bea-9c83-eb92c1b3b894@lunn.ch>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352701-linux-kernel-netdev=dewy.ru
References: <20261028011317.1557238-1-cjd@cjdns.fr> <20261028011317.1557238-4-cjd@cjdns.fr>

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-352701-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v3 3/7] net: dsa: mediatek: add support for passthrough
 mode
Date: Wed, 28 Oct 2026 03:15:59 +0100
Organization: Usenet Network
Message-ID: <734d4f06-26af-4bea-9c83-eb92c1b3b894@lunn.ch>
References: <20261028011317.1557238-1-cjd@cjdns.fr>
 <20261028011317.1557238-4-cjd@cjdns.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1682735"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:LzuyNuQB7tg/Szmyo7KsFaLRKjQ= sha256:fjAquZLGHZVQQSmOYIwoQkSyDgWOtfFcNyI6Go/6uU8=
	sha1:QSsiH+bFH2scUVnj2Qy4tIJrui4= sha256:jQ4XQoLaC2HiSqumyVH7I8do+LR9kEXfr2M7NSII5gU=
Content-Disposition: inline
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 4C106125C2A; Wed, 28 Oct 2026 05:16:51 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[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 (1024-bit key)
	header.d=lunn.ch
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 ek2A1YsWkxee;
	Wed, 28 Oct 2026 05:16:47 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-352701-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id F27F5125C29; Wed, 28 Oct 2026 05:16:37 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 4140426780; Wed, 28 Oct 2026 02:16:30 +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=1793153789;
	b=dYEC5xEhUNpxEkUSFtu8RVcdgHUQqlm8bqhDOfdBmTOcq26xZkEmIulBQa220jFAqLax
	 /95sAQBtGKjlrvuLuIihUSDgW3XmCB4j122Sm9dgnmHSKFUwoH5B1EpCAnMV1oBVuSGLv
	 El6DBsbdfYLx8aHWSQCGxHofaY6Mye3Ot7OOSR3I/zfRl/6Fn4suLHZPu97ACneK8adDE
	 SUtlVV0ZS6EFF2NoLbClkY1vx3tEoX5B7cWpxB6byoR8W2ldd8mPq1pXDi19Gu8G4OTN9
	 bo3C7IcMXDqsgzeassqGRIu68c/9e/DnTlPGlRakX+rgGmYB8OdsH0Xpuqi592qh39w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793153789;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=S0yM+Za6i75m67uWOOTgt8atqe/7TENA3+sFmUmADnw=;
	b=DDIOuZ/hy3tA3yMzjnUYNMl/bYjHdH+goA03A+3BzOJJicbpUZL59mNSgbHwD4NVLtbK
	 TM9PBR63eyqaUs7A+VnKzHOBAGH9LSRQqs3Om6s8wHF5DElNP1G7TZzKvP8zWHAFV8DTC
	 2NzFR7phkSi6B9YOW8uQTg4niZVtgZDaFcVJ5jL4b4rnT9ctZoHsK4ClNwi+un5vAj0ay
	 IprfdrjR3Zn4aXzy0MaR7mJ2e8CTVuOCZ9OZtMNNpV84y95G4uMWkzIY1evS4EVxg7z9U
	 A25JD0ql7oE+LXFxeDJjCVznDjiDnwRLxkSXi0ZXVaoavF9nWax5xSvS3O2gBE3Oysw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=E3j3F7Y+;
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	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 5301D606A324;
	Wed, 28 Oct 2026 02:16:29 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=E3j3F7Y+
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793153778;
	b=sK8mK9o36Cc5I0SsHXIPqu+RRQY1gGknRczJtDLR/UVTpvTUtd10evuuZ1QSM4WY53bd
	 WVqiqF9jixNNFxe3qPHNRcz1qp9Y39LAA6LJfPAdKs5iN5821cdcuvcl/3pSSenLdYIBm
	 nsAF91thc9heQhgRFeuCuXRPaa4Sagq4s8RqGrsxi/7ydKvSFsze+PjqmYsTXo9UDg6YL
	 7mDGLSnRrOiYq32UFKwNYYQI9y0FmH9WZPZxt3kpjU4M/6o7TJDQYSP85Y9hNmWwd4Xc2
	 SVgxs2/mVyhaQEn+6bSUtrwT08sefvbazZXagXNmC/ZCd7zrz2pDQIjrCOmG8MQ+W8Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793153778;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=S0yM+Za6i75m67uWOOTgt8atqe/7TENA3+sFmUmADnw=;
	b=JWCuBntVaQ5oFeC1BzQR3Y5MwdC5rVz8CPRzWuIB+gwX1zlMwIXkO3Fqg9LTiA2pVvkd
	 q9nKQsBdLJP9YaONRzpaTRwTpwocjjp6WlxmD7qAYa1QnCqnXre6IfSmy7rOKxwDk2M+l
	 /Vu5QEj5LCQx4+tEc98+/JkSrDqXEJsYVwH/ZoJfhHuIq+XVNs3UqCOIkIIKbc5TVS2Kq
	 RoWPXJiy7HUdUF9a+Ghh2xihxWMrHMsxKQNJPd1l2CeqKuVLgi99+UdEaSWpYWgQDox9p
	 fuO/bZlB2cFY7+kUuo/6VOCaYi5kbY+64Uw9hMun8utZjDfZYKAm3ElFL25YiLVrDcw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=E3j3F7Y+;
	arc=none smtp.remote-ip=156.67.10.101
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D19C4606A31A;
	Wed, 28 Oct 2026 02:16:17 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D19C4606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
	s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:
	References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:
	Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:
	Content-ID:Content-Description:Content-Disposition:In-Reply-To:References;
	bh=S0yM+Za6i75m67uWOOTgt8atqe/7TENA3+sFmUmADnw=; b=E3j3F7Y+u/kGXbJaO3M9WgbuEH
	w8vTnDWs03s3uQEcnY6GlWG6WNhfro/6yV0Ngud7HTlLGWFvp9FYHTF6Hp0IFmB/28PDpPdSB4NQs
	1HezBmIZWGKMi9mCnPMzSIuS6M0GllBwq36s+ZIMF+kcOGhlMwlURjT/ufM5LMDRuF64=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xLtCp-00D2nO-NZ; Wed, 28 Oct 2026 03:15:59 +0100
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-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-In-Reply-To: <20261028011317.1557238-4-cjd@cjdns.fr>