Netdev List
 help / color / mirror / Atom feed
From: Yongzhao Chen <yongzhao.derek@gmail.com>
To: netdev-bot+sashiko@kernel.org
Cc: netdev@vger.kernel.org, Christian Marangi <ansuelsmth@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>, 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>,
	Russell King <linux@armlinux.org.uk>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	linux-kernel@vger.kernel.org, Ziyang Huang <hzyitc@outlook.com>
Subject: Re: [PATCH net v5] net: dsa: qca8k: preserve port state across MTU changes
Date: Mon, 19 Oct 2026 19:37:06 +0200	[thread overview]
Message-ID: <20261019173706.198461-1-yongzhao.derek@gmail.com> (raw)
In-Reply-To: <179240775070.3135.2434822808609533404@kernel.org>

On Mon, 19 Oct 2026 11:02:30 +0000 netdev-bot+sashiko@kernel.org wrote:
> That path only reverts the conduit MTU. Does the switch-global
> MAX_FRAME_SIZE register then keep the new value, while DSA and the
> conduit keep the old MTU? Nothing seems to write the old frame size
> back.

Yes. With v5, a failed restore after a successful frame-size write
leaves the new frame size in the switch while DSA keeps the old MTU.
On a fixed-link CPU port the same failure can keep the MAC off until
a link flap or reboot.

> Two options: keep returning success once MAX_FRAME_SIZE has been
> written, or roll MAX_FRAME_SIZE back on failure. Either way, should a
> failed restore stop being treated as the saved state on later calls?

v6 takes the first option: it returns the result of the frame-size
write, and a later restore failure no longer replaces it. A failed
PORT_STATUS write now keeps its target and is retried every second
from delayed work, so a fixed-link port does not depend on another
mac_link_up(). Newer port decisions replace the pending bits. The
next MTU change first recovers pending writes on ports 0 and 6 and
returns an error if that fails, so a failed restore is not taken as
the saved state.

A userspace harness that compiles the driver functions and
dsa_user_change_mtu() now covers both cases, and v5 fails it. v6 has
not been tested on hardware. I will send it separately.

Thanks,
Yongzhao Chen

pw-bot: cr

      reply	other threads:[~2026-10-19 17:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 10:45 [PATCH net v5] net: dsa: qca8k: preserve port state across MTU changes Yongzhao Chen
2026-10-19 11:02 ` netdev-bot+sashiko
2026-10-19 17:37   ` Yongzhao Chen [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=20261019173706.198461-1-yongzhao.derek@gmail.com \
    --to=yongzhao.derek@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=horms@kernel.org \
    --cc=hzyitc@outlook.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.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