🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16684

Re: [PATCH net-next v2 3/3] net: dsa: forget the port ageing time when the port leaves the bridge

#16684
From: Andrew Lunn
Date: Sun, 15 Nov 2026 15:40
26 lines
9981 bytes
On Sun, Nov 15, 2026 at 11:59:53AM +0100, Oleksij Rempel wrote:
> Clear the cached dp->ageing_time when the port leaves the bridge.
> Otherwise dsa_switch_fastest_ageing_time() still uses the ageing time
> of the port that left. If the port leaves with a shorter ageing time,
> for example during an STP topology change, the switch stays at the
> short value until that port joins a bridge again. With this change the
> switch goes back to the long value when the bridge restores it at the
> end of the topology change. The switch gets the restored value only if
> another port of the same bridge is still in this DSA tree.
> 
> Found by code inspection. Tested on a KSZ9893 with lan1 and lan2 in a
> bridge, ageing time 300 s:
> - kernel STP, forward delay 4 s, lan2 removed during a topology change:
>   without this patch the switch stayed at 8 s (2 x 4 s). With it, the
>   switch went back to 300 s at the end of the topology change.
> - no STP: I set the ageing time to 10 s, removed lan2, then set 300 s.
>   The switch stayed at 10 s without this patch and went to 300 s with
>   it.
> 
> Fixes: 34a79f63bbe4 ("net: dsa: support switchdev ageing time attr")
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Technical Details
Message-ID: <42151227-f088-4b7b-931b-45500943204f@lunn.ch>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363741-linux-kernel-netdev=dewy.ru
References: <20261115-ksz-stp-ageing-v2-0-7af27320033e@pengutronix.de> <20261115-ksz-stp-ageing-v2-3-7af27320033e@pengutronix.de>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363741-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v2 3/3] net: dsa: forget the port ageing time
 when the port leaves the bridge
Date: Sun, 15 Nov 2026 16:40:29 +0100
Organization: Usenet Network
Message-ID: <42151227-f088-4b7b-931b-45500943204f@lunn.ch>
References: <20261115-ksz-stp-ageing-v2-0-7af27320033e@pengutronix.de>
 <20261115-ksz-stp-ageing-v2-3-7af27320033e@pengutronix.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1840201"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:IrK4z6UoYeKQzi05hYIrHWDwH2U= sha256:eG8MLT9bruiU8QXcNf+S8rbSJiWQpS3fBhuEGuK7M+o=
	sha1:wcSLbrcvFnDtiq5bXXJJ6baglxY= sha256:zvxKz0OTPJ0JjfALL0BCpqAjA5Dve43HE+QsWGec6Ng=
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 B37A01149F7; Sun, 15 Nov 2026 18:41:01 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 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.249,
	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 CNhVGP5z6L7L;
	Sun, 15 Nov 2026 18:40:58 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-363741-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 695C91149BD; Sun, 15 Nov 2026 18:40:49 +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 328E73E617; Sun, 15 Nov 2026 15:40:38 +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=1794757237;
	b=5sXs4KMAmzg8/ejP33eGSBKSQDEN1ZwBV/kM+EDarIXYNzYE9t2279EzAa9mTLpib8Bj
	 Ia3TuBpGrMFkD6UQyfdj58MBDUiqsxJ7uPmX0B6hj29mO6NBCy3UbOHP/PvG4c6r0bZS+
	 EdICOYPIVNNxbZSQMLQpoR5Y92SCIhWHZh10xYOfDxmFPhHyoIH7DLuSteYXcl35kYzfu
	 OMYZETygMxRwD2pEZfhPcFj05hhJo0h6GGucY9JwdmI6rCppP40DxuEcVdE0zM+jBt8Wh
	 DYSYgTnM1ekCZseYboWdIe919xfSxU97HL6T3keS9M2gHWq6CXuUfZ60x1Dz40vOpSg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794757237;
	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=f5HX+yAVrB8F2pjsF8sji6JVCmbYuW4vsp/eHAbGp4k=;
	b=nThFE8XwCmUb4prs4q77kMM1w4xnwFtAozWByNzw4hfapNgMxtuG94ZZWQkWS6DcC7bh
	 4Grz0klaH+s/j2hoXQMbjaK1P9wSMky74NtTGHLcX2m9+jyxukIE8NVXluwHwN1NfGOQ6
	 WH820G84zWNgjJcMZPoCo8Fs902443cGBiS50uF+NL4FRQH6wwNaA1kG4EPzXF8DFel2k
	 5WD/+1eCcNXXV6kZ1+mH6df0hN5CWGCu4Wp/FUmkYpM9/ixnfi/38AZle6D1c6tANSv/J
	 H9jtTs8A5QjCElFTmfYekCmmNWyA2sxxxcky3f+M00PhkoyQuAD4Fdl53FoyhsVgD3g==
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=cS1JMUss;
	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 02757606A33B;
	Sun, 15 Nov 2026 15:40:37 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=cS1JMUss
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=1794757236;
	b=DSSuPg0jUw//cxebQ7fP5JuJlEq60cREej2y203LGESNjSdoVu4LznBFXUt/KZ3ZNP7g
	 I0yCu4Yp6vBZvka+mYdT3E8MMSFS3mpGagIVReY65fq5MLy5n2DDICF8rEwCX2I0UGMFo
	 1i4kXkdv31X4UQ1jcbSkYQYvyTWaA+hkwN6euvTAIeYpcsnaN2GbhsN1mp4v4KOwGNUUY
	 Zw7Zlr0eyU4vyFi6BBjw+vr/If2WuoMpqJceB1LJ3Do91E605rcdvE69PEhTYdN8Tdnug
	 LU9IqywOt56vIzIjeb0NEJAuXIhptL5ZwR0AyEBDTauF1H798PCAK78/yBku2vKE4cQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794757236;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=f5HX+yAVrB8F2pjsF8sji6JVCmbYuW4vsp/eHAbGp4k=;
	b=Eq0U+g+5Ivuqcjxpxvg/U9f2pVnwYNzmOFmsDz1vfFbyBCwE3sNKbadLRnYgjRaC7Keh
	 2bVNTzVHfXZkJieUhBYp73vO4VzFag8b3HIDc4SrhmAAipIjgnUt15nbnJIDMRjyUCyhJ
	 loHOMGIrSCa8abC8ZXThiS6gaYLKJFIEJvvAcU7fu5NZx2qJlViEMr7b9kHtXDQg7DWcY
	 uxs4bN0nxnI+rfsDbgtgFAKnf3uPvgQc5Il9VvLIj+j3Z9BICvSLPA9lzTIDh8dYESYy5
	 zWPEDspRH10XZt5ZypjuS8U4MptnRt7JJcRriyo8FCxz0o/PTEKoMThX+k+t+FYUjTA==
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=cS1JMUss;
	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 1A2DB606A327;
	Sun, 15 Nov 2026 15:40:34 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1A2DB606A327
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=f5HX+yAVrB8F2pjsF8sji6JVCmbYuW4vsp/eHAbGp4k=; b=cS1JMUssqSxKWV6vwCmwUR83He
	Jsx8xh4M4vzCMb/6yylQMHlklJAUypwSNbtrHAHBJnzZ7db4ZV+tvMyZtRHDDxg7uVd6TSTPE2yu4
	22PNv7Mx9rjvj6p/DzTpZ3f4YAroC53FqApVa0OLZPVTctFTNjgGwye9JVNjDywrEnCE=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xScLF-00GdR0-L1; Sun, 15 Nov 2026 16:40:29 +0100
X-Cc: Woojung Huh <woojung.huh@microchip.com>, UNGLinuxDriver@microchip.com,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Arun Ramadoss <arun.ramadoss@microchip.com>,
	Jiri Pirko <jiri@resnulli.us>, Linus Walleij <linusw@kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vivien Didelot <vivien.didelot@gmail.com>, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de,
	Jens Emil Schulz Østergaard <jensemil.schulzostergaard@microchip.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: <20261115-ksz-stp-ageing-v2-3-7af27320033e@pengutronix.de>