From: "Łukasz Majewski" <lukma@nabladev.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, "Andrew Lunn" <andrew+netdev@lunn.ch>,
"Alvin Šipraga" <alsi@bang-olufsen.dk>,
"Clément Léger" <clement.leger@bootlin.com>,
"Chester A. Unal" <chester.a.unal@arinc9.com>,
"Daniel Golle" <daniel@makrotopia.org>,
"David Yang" <mmyangfl@gmail.com>,
"DENG Qingfang" <dqfext@gmail.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"George McCollister" <george.mccollister@gmail.com>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
"Jonas Gorski" <jonas.gorski@gmail.com>,
"Kurt Kanzenbach" <kurt@linutronix.de>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Sean Wang" <sean.wang@mediatek.com>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Woojung Huh" <woojung.huh@microchip.com>,
"Xiaoliang Yang" <xiaoliang.yang_1@nxp.com>,
linux-renesas-soc@vger.kernel.org, UNGLinuxDriver@microchip.com
Subject: Re: [PATCH net-next 00/15] DSA simple HSR offload
Date: Mon, 1 Dec 2025 09:46:46 +0100 [thread overview]
Message-ID: <20251201094610.63424e51@wsk> (raw)
In-Reply-To: <20251130131657.65080-1-vladimir.oltean@nxp.com>
Hi Vladimir,
> Provide a "simple" form of HSR offload for 8 DSA drivers (just the
> NETIF_F_HW_HSR_DUP feature) based on the fact that their taggers use
> the dsa_xmit_port_mask() function. This is in patches 6-13/15.
>
> The helpers per se are introduced in patch 5/15, and documented in
> patch 15/15. Patch 14/15 is another small (and related) documentation
> update.
>
> For HSR interlink ports the offloading rules are not quite so clear,
> and for now we completely reject the offload. We can revise that once
> we see a full offload implementation and understand what is needed.
>
> To reject the offload, we need to know the port type, and patch 2/15
> helps with that.
>
> xrs700x is another driver which should have rejected offload based on
> port type (patch 4/15). This is a bug fix submitted through net-next
> due to the extra API required to fix it. If necessary, it could also
> be picked up separately for backporting.
>
> There is also patch 3/15, which makes the HSR offload like the others
> supported by DSA: if we fall back to the software implementation,
> don't call port_hsr_leave(), because by definition there won't be
> anything to do.
>
> A slightly unrelated change is patch 1/15, but I noticed this along
> the way, and if I were to submit it separately, it would conflict
> with this work (it would appear in patch 12/15's context).
>
> Most of the driver additions are trivial. By far the most complex was
> ocelot (which I could test). Microchip ksz (which I cannot test, and
> did not patch) would also have some complexity. Essentially,
> ksz_hsr_join() could fall back to a partial offload through the
> simple helpers, if the full offload is not possible. But keeping
> track of which offload kind was used is necessary later in
> ksz_hsr_leave(). This is left as homework for interested developers.
>
It is nice, that somebody thinks about homeworks for other
developers ... (:-D)
Mine (from netdev ML) includes, but is not limited to, MoreThanIP switch
driver (yes, for NXP's imx287) .... (v21 in preparation).
Nonetheless, are changes from this patch set applicable to HSR tests:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/net/hsr
Especially, the hsr_ping.sh and hsr_redbox.sh?
> With this patch set, one can observe a 50% reduction in transmitted
> traffic over HSR interfaces.
>
> Cc: "Alvin Šipraga" <alsi@bang-olufsen.dk>
> Cc: "Clément Léger" <clement.leger@bootlin.com>
> Cc: "Chester A. Unal" <chester.a.unal@arinc9.com>
> Cc: Daniel Golle <daniel@makrotopia.org>
> Cc: David Yang <mmyangfl@gmail.com>
> Cc: DENG Qingfang <dqfext@gmail.com>
> Cc: Florian Fainelli <florian.fainelli@broadcom.com>
> Cc: George McCollister <george.mccollister@gmail.com>
> Cc: Hauke Mehrtens <hauke@hauke-m.de>
> Cc: Jonas Gorski <jonas.gorski@gmail.com>
> Cc: Kurt Kanzenbach <kurt@linutronix.de>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Lukasz Majewski <lukma@denx.de>
> Cc: Sean Wang <sean.wang@mediatek.com>
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: Woojung Huh <woojung.huh@microchip.com>
> Cc: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
> Cc: linux-renesas-soc@vger.kernel.org
> Cc: UNGLinuxDriver@microchip.com
>
> Vladimir Oltean (14):
> net: dsa: mt7530: unexport mt7530_switch_ops
> net: dsa: avoid calling ds->ops->port_hsr_leave() when unoffloaded
> net: dsa: xrs700x: reject unsupported HSR configurations
> net: dsa: add simple HSR offload helpers
> net: dsa: yt921x: use simple HSR offloading helpers
> net: dsa: ocelot: use simple HSR offload helpers
> net: dsa: realtek: use simple HSR offload helpers
> net: dsa: lantiq_gswip: use simple HSR offload helpers
> net: dsa: mv88e6060: use simple HSR offload helpers
> net: dsa: hellcreek: use simple HSR offload helpers
> net: dsa: mt7530: use simple HSR offload helpers
> net: dsa: a5psw: use simple HSR offload helpers
> Documentation: net: dsa: mention availability of RedBox
> Documentation: net: dsa: mention simple HSR offload helpers
>
> Xiaoliang Yang (1):
> net: hsr: create an API to get hsr port type
>
> Documentation/networking/dsa/dsa.rst | 17 +++--
> drivers/net/dsa/hirschmann/hellcreek.c | 2 +
> drivers/net/dsa/lantiq/lantiq_gswip_common.c | 2 +
> drivers/net/dsa/mt7530.c | 5 +-
> drivers/net/dsa/mt7530.h | 1 -
> drivers/net/dsa/mv88e6060.c | 2 +
> drivers/net/dsa/ocelot/felix.c | 70
> +++++++++++++++++++- drivers/net/dsa/realtek/rtl8365mb.c |
> 2 + drivers/net/dsa/realtek/rtl8366rb.c | 2 +
> drivers/net/dsa/rzn1_a5psw.c | 2 +
> drivers/net/dsa/xrs700x/xrs700x.c | 11 +++
> drivers/net/dsa/yt921x.c | 3 +
> include/linux/if_hsr.h | 9 +++
> include/net/dsa.h | 9 +++
> net/dsa/dsa.c | 65 ++++++++++++++++++
> net/dsa/port.c | 3 +
> net/hsr/hsr_device.c | 20 ++++++
> net/hsr/hsr_slave.c | 7 +-
> 18 files changed, 220 insertions(+), 12 deletions(-)
>
--
Best regards,
Lukasz Majewski
--
Nabla Software Engineering GmbH
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: office@nabladev.com
Managing Director : Stefano Babic
next prev parent reply other threads:[~2025-12-01 8:46 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-30 13:16 [PATCH net-next 00/15] DSA simple HSR offload Vladimir Oltean
2025-11-30 13:16 ` [PATCH net-next 01/15] net: dsa: mt7530: unexport mt7530_switch_ops Vladimir Oltean
2025-11-30 20:30 ` Daniel Golle
2025-12-01 5:43 ` Chester A. Unal
2025-11-30 13:16 ` [PATCH net-next 02/15] net: hsr: create an API to get hsr port type Vladimir Oltean
2025-12-01 8:32 ` Łukasz Majewski
2025-11-30 13:16 ` [PATCH net-next 03/15] net: dsa: avoid calling ds->ops->port_hsr_leave() when unoffloaded Vladimir Oltean
2025-11-30 13:16 ` [PATCH net-next 04/15] net: dsa: xrs700x: reject unsupported HSR configurations Vladimir Oltean
2025-12-01 16:20 ` George McCollister
2025-11-30 13:16 ` [PATCH net-next 05/15] net: dsa: add simple HSR offload helpers Vladimir Oltean
2025-11-30 13:16 ` [PATCH net-next 06/15] net: dsa: yt921x: use simple HSR offloading helpers Vladimir Oltean
2025-11-30 13:16 ` [PATCH net-next 07/15] net: dsa: ocelot: use simple HSR offload helpers Vladimir Oltean
2025-11-30 13:16 ` [PATCH net-next 08/15] net: dsa: realtek: " Vladimir Oltean
2025-11-30 16:03 ` Linus Walleij
2025-11-30 13:16 ` [PATCH net-next 09/15] net: dsa: lantiq_gswip: " Vladimir Oltean
2025-11-30 13:16 ` [PATCH net-next 10/15] net: dsa: mv88e6060: " Vladimir Oltean
2025-11-30 13:16 ` [PATCH net-next 11/15] net: dsa: hellcreek: " Vladimir Oltean
2025-11-30 13:16 ` [PATCH net-next 12/15] net: dsa: mt7530: " Vladimir Oltean
2025-12-01 5:43 ` Chester A. Unal
2025-11-30 13:16 ` [PATCH net-next 13/15] net: dsa: a5psw: " Vladimir Oltean
2025-11-30 13:16 ` [PATCH net-next 14/15] Documentation: net: dsa: mention availability of RedBox Vladimir Oltean
2025-12-02 0:53 ` Jakub Kicinski
2025-11-30 13:16 ` [PATCH net-next 15/15] Documentation: net: dsa: mention simple HSR offload helpers Vladimir Oltean
2025-12-01 8:46 ` Łukasz Majewski [this message]
2025-12-02 1:00 ` [PATCH net-next 00/15] DSA simple HSR offload patchwork-bot+netdevbpf
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=20251201094610.63424e51@wsk \
--to=lukma@nabladev.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alsi@bang-olufsen.dk \
--cc=andrew+netdev@lunn.ch \
--cc=bigeasy@linutronix.de \
--cc=chester.a.unal@arinc9.com \
--cc=clement.leger@bootlin.com \
--cc=daniel@makrotopia.org \
--cc=dqfext@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=george.mccollister@gmail.com \
--cc=hauke@hauke-m.de \
--cc=jonas.gorski@gmail.com \
--cc=kurt@linutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mmyangfl@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=sean.wang@mediatek.com \
--cc=vladimir.oltean@nxp.com \
--cc=woojung.huh@microchip.com \
--cc=xiaoliang.yang_1@nxp.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;
as well as URLs for NNTP newsgroup(s).