Re: [PATCH net-next v3 3/3] net: dsa: forget the port ageing time when the port leaves the bridge
From: Oleksij Rempel
Date: Thu Nov 19 2026 - 02:23:38 EST
On Thu, Nov 19, 2026 at 01:03:22AM +0000, netdev-bot+sashiko@xxxxxxxxxx wrote:
> Can the switch still stay at the departed port's short ageing time after
> this change?
Yes. The v3 cover letter lists this case as not fixed: "The last port
of one bridge leaves the switch while another bridge stays on it."
In my reply to v2 I wrote that v3 would add a patch for this case. I
dropped it, and the v3 changelog should have said so. That patch
reprogrammed the switch when a port left. It did not cover the case
where the last bridged port of the switch leaves.
This patch only drops a cached value and writes nothing to the switch.
The dropped patch added a write to the switch, and with patch 1
sometimes a flush, to every port leave. That is new behaviour for
every driver with .set_ageing_time(). I want such a change reviewed on
its own, not in this series of fixes.
This patch does not make the case worse:
- Before this patch, DSA kept the ageing time of a port that left
until the port joined a bridge again. Every later update included
that stale value in the minimum. So the switch got the short ageing
time again at each update.
- With this patch, DSA forgets that value. The switch keeps the short
value until DSA computes the ageing time again. That happens when a
port of this DSA tree joins a bridge, or when a bridge with a port of
this tree sets its ageing time. If neither happens, the switch stays
at the short value.
> The existing comment just above the new code says there is "no good
> reason (or value) to change it to".
Yes, that comment is out of date. After this patch there is a value to
use when another port of the switch is still bridged: the minimum of
the remaining cached values. I still do not reprogram the switch on
leave in this series, for the reason above.
Oleksij