public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 00/15] Introduce the dsa_xmit_port_mask() tagging protocol helper
@ 2025-11-27 12:08 Vladimir Oltean
  2025-11-27 12:08 ` [PATCH net-next 01/15] net: dsa: introduce " Vladimir Oltean
                   ` (15 more replies)
  0 siblings, 16 replies; 23+ messages in thread
From: Vladimir Oltean @ 2025-11-27 12:08 UTC (permalink / raw)
  To: netdev
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Alvin Šipraga, Clément Léger,
	Daniel Golle, David Yang, DENG Qingfang, Florian Fainelli,
	George McCollister, Hauke Mehrtens, Jonas Gorski, Kurt Kanzenbach,
	Linus Walleij, linux-renesas-soc, Sean Wang, UNGLinuxDriver,
	Woojung Huh

What
----

Some DSA tags have just the port number in the TX header format, others
have a bit field where in theory, multiple bits can be set, even though
DSA only sets one.

The latter kind is now making use of a dsa_xmit_port_mask() helper,
which will decide when to set more than 1 bit in that mask.

Why
---

David Yang has pointed out in a recently posted patch that HSR packet
duplication on transmission can be offloaded even on HSR-unaware
switches. This should be made generally available to all DSA switches.

How to test
-----------

These patches just lay the groundwork, and there should be no functional
change - so for this set, regression testing is all that's necessary.

For testing the HSR packet duplication idea, I've put together a branch:
https://github.com/vladimiroltean/linux/commits/dsa-simple-hsr-offload/
where most drivers are patched to call dsa_port_simple_hsr_join() and
dsa_port_simple_hsr_leave().

Assuming there are volunteers to also test the latter, one can enable
CONFIG_HSR and create a HSR device using:
$ ip link add name hsr0 type hsr slave1 swp0 slave2 swp1 supervision 45 version 1

This needs to be connected using 2 cables to another system where the
same command was run. Then, one should be able to ping the other board
through the hsr0 interface.

Without the Github branch, a ping over HSR should increase the DSA
conduit interface's TX counters by 2 packets. With the Github branch,
the TX counters should increase by only 1 packet.

Why so many patches
-------------------

To avoid the situation where a patch has to be backported, conflicts
with the work done here, pulls this in as a dependency, and that pulls
in 13 other unrelated drivers. These don't have any dependencies between
each other and can be cherry-picked at will (except they all depend on
patch 1/15).

When will you post the rest of the patches from the Github branch
-----------------------------------------------------------------

Tomorrow. This will leave some time for some early feedback while still
having a chance to catch v6.19.

Thanks for reading!

Cc: "Alvin Šipraga" <alsi@bang-olufsen.dk>
Cc: Chester A. Unal" <chester.a.unal@arinc9.com>
Cc: "Clément Léger" <clement.leger@bootlin.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: linux-renesas-soc@vger.kernel.org
Cc: Sean Wang <sean.wang@mediatek.com>
Cc: UNGLinuxDriver@microchip.com
Cc: Woojung Huh <woojung.huh@microchip.com>

Vladimir Oltean (15):
  net: dsa: introduce the dsa_xmit_port_mask() tagging protocol helper
  net: dsa: tag_brcm: use the dsa_xmit_port_mask() helper
  net: dsa: tag_gswip: use the dsa_xmit_port_mask() helper
  net: dsa: tag_hellcreek: use the dsa_xmit_port_mask() helper
  net: dsa: tag_ksz: use the dsa_xmit_port_mask() helper
  net: dsa: tag_mtk: use the dsa_xmit_port_mask() helper
  net: dsa: tag_mxl_gsw1xx: use the dsa_xmit_port_mask() helper
  net: dsa: tag_ocelot: use the dsa_xmit_port_mask() helper
  net: dsa: tag_qca: use the dsa_xmit_port_mask() helper
  net: dsa: tag_rtl4_a: use the dsa_xmit_port_mask() helper
  net: dsa: tag_rtl8_4: use the dsa_xmit_port_mask() helper
  net: dsa: tag_rzn1_a5psw: use the dsa_xmit_port_mask() helper
  net: dsa: tag_trailer: use the dsa_xmit_port_mask() helper
  net: dsa: tag_xrs700x: use the dsa_xmit_port_mask() helper
  net: dsa: tag_yt921x: use the dsa_xmit_port_mask() helper

 net/dsa/tag.h            | 18 ++++++++++++++++++
 net/dsa/tag_brcm.c       |  8 ++++----
 net/dsa/tag_gswip.c      |  6 ++----
 net/dsa/tag_hellcreek.c  |  3 +--
 net/dsa/tag_ksz.c        | 20 ++++----------------
 net/dsa/tag_mtk.c        |  3 ++-
 net/dsa/tag_mxl-gsw1xx.c |  7 ++++---
 net/dsa/tag_ocelot.c     |  6 ++----
 net/dsa/tag_qca.c        |  3 +--
 net/dsa/tag_rtl4_a.c     |  2 +-
 net/dsa/tag_rtl8_4.c     |  3 +--
 net/dsa/tag_rzn1_a5psw.c |  3 +--
 net/dsa/tag_trailer.c    |  3 +--
 net/dsa/tag_xrs700x.c    |  8 +-------
 net/dsa/tag_yt921x.c     |  8 +++-----
 15 files changed, 46 insertions(+), 55 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2025-12-31 21:05 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-27 12:08 [PATCH net-next 00/15] Introduce the dsa_xmit_port_mask() tagging protocol helper Vladimir Oltean
2025-11-27 12:08 ` [PATCH net-next 01/15] net: dsa: introduce " Vladimir Oltean
2025-11-27 12:08 ` [PATCH net-next 02/15] net: dsa: tag_brcm: use the dsa_xmit_port_mask() helper Vladimir Oltean
2025-11-27 13:29   ` Jonas Gorski
2025-11-27 13:42     ` Vladimir Oltean
2025-11-27 12:08 ` [PATCH net-next 03/15] net: dsa: tag_gswip: " Vladimir Oltean
2025-11-27 12:08 ` [PATCH net-next 04/15] net: dsa: tag_hellcreek: " Vladimir Oltean
2025-11-27 12:08 ` [PATCH net-next 05/15] net: dsa: tag_ksz: " Vladimir Oltean
2025-11-27 12:08 ` [PATCH net-next 06/15] net: dsa: tag_mtk: " Vladimir Oltean
2025-11-27 12:08 ` [PATCH net-next 07/15] net: dsa: tag_mxl_gsw1xx: " Vladimir Oltean
2025-11-27 12:08 ` [PATCH net-next 08/15] net: dsa: tag_ocelot: " Vladimir Oltean
2025-11-27 12:08 ` [PATCH net-next 09/15] net: dsa: tag_qca: " Vladimir Oltean
2025-11-27 12:08 ` [PATCH net-next 10/15] net: dsa: tag_rtl4_a: " Vladimir Oltean
2025-12-31  3:17   ` Luiz Angelo Daros de Luca
2025-12-31 21:05   ` Linus Walleij
2025-11-27 12:08 ` [PATCH net-next 11/15] net: dsa: tag_rtl8_4: " Vladimir Oltean
2025-12-31  3:20   ` Luiz Angelo Daros de Luca
2025-12-31 21:05   ` Linus Walleij
2025-11-27 12:08 ` [PATCH net-next 12/15] net: dsa: tag_rzn1_a5psw: " Vladimir Oltean
2025-11-27 12:09 ` [PATCH net-next 13/15] net: dsa: tag_trailer: " Vladimir Oltean
2025-11-27 12:09 ` [PATCH net-next 14/15] net: dsa: tag_xrs700x: " Vladimir Oltean
2025-11-27 12:09 ` [PATCH net-next 15/15] net: dsa: tag_yt921x: " Vladimir Oltean
2025-11-29  4:10 ` [PATCH net-next 00/15] Introduce the dsa_xmit_port_mask() tagging protocol helper 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