mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: netdev-bot+sashiko@kernel.org
Cc: woojung.huh@microchip.com, UNGLinuxDriver@microchip.com,
	andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, arun.ramadoss@microchip.com, jiri@resnulli.us,
	linusw@kernel.org, f.fainelli@gmail.com,
	vivien.didelot@gmail.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de,
	jensemil.schulzostergaard@microchip.com
Subject: Re: [PATCH net-next v3 3/3] net: dsa: forget the port ageing time when the port leaves the bridge
Date: Thu, 19 Nov 2026 08:23:27 +0100	[thread overview]
Message-ID: <av6j73ghnlzgudsz@pengutronix.de> (raw)
In-Reply-To: <179505020217.3136.6917391809574658393@kernel.org>

On Thu, Nov 19, 2026 at 01:03:22AM +0000, netdev-bot+sashiko@kernel.org 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

      reply	other threads:[~2026-11-19  7:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 13:02 [PATCH net-next v3 0/3] net: dsa: make a shorter bridge ageing time take effect Oleksij Rempel
2026-11-17 13:02 ` [PATCH net-next v3 1/3] net: dsa: microchip: ksz9477: apply a shorter ageing time at once Oleksij Rempel
2026-11-19  1:03   ` netdev-bot+sashiko
2026-11-19  7:19     ` Oleksij Rempel
2026-11-17 13:02 ` [PATCH net-next v3 2/3] net: dsa: ignore the old ageing time of the port being changed Oleksij Rempel
2026-11-17 21:37   ` Linus Walleij
2026-11-17 13:02 ` [PATCH net-next v3 3/3] net: dsa: forget the port ageing time when the port leaves the bridge Oleksij Rempel
2026-11-19  1:03   ` netdev-bot+sashiko
2026-11-19  7:23     ` Oleksij Rempel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=av6j73ghnlzgudsz@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=arun.ramadoss@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=horms@kernel.org \
    --cc=jensemil.schulzostergaard@microchip.com \
    --cc=jiri@resnulli.us \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=vivien.didelot@gmail.com \
    --cc=woojung.huh@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®