netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/15] DSA simple HSR offload
@ 2025-11-30 13:16 Vladimir Oltean
  2025-11-30 13:16 ` [PATCH net-next 01/15] net: dsa: mt7530: unexport mt7530_switch_ops Vladimir Oltean
                   ` (16 more replies)
  0 siblings, 17 replies; 25+ messages in thread
From: Vladimir Oltean @ 2025-11-30 13:16 UTC (permalink / raw)
  To: netdev
  Cc: Andrew Lunn, Alvin Šipraga, Clément Léger,
	Chester A. Unal, Daniel Golle, David Yang, DENG Qingfang,
	Florian Fainelli, George McCollister, Hauke Mehrtens,
	Jonas Gorski, Kurt Kanzenbach, Linus Walleij, Lukasz Majewski,
	Sean Wang, Sebastian Andrzej Siewior, Woojung Huh, Xiaoliang Yang,
	linux-renesas-soc, UNGLinuxDriver

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.

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(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2025-12-02  1:03 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH net-next 00/15] DSA simple HSR offload Łukasz Majewski
2025-12-02  1:00 ` patchwork-bot+netdevbpf

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).