From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: netdev@vger.kernel.org
Cc: "Andrew Lunn" <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Alvin Šipraga" <alsi@bang-olufsen.dk>,
"Clément Léger" <clement.leger@bootlin.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>,
linux-renesas-soc@vger.kernel.org,
"Sean Wang" <sean.wang@mediatek.com>,
UNGLinuxDriver@microchip.com,
"Woojung Huh" <woojung.huh@microchip.com>
Subject: [PATCH net-next 00/15] Introduce the dsa_xmit_port_mask() tagging protocol helper
Date: Thu, 27 Nov 2025 14:08:47 +0200 [thread overview]
Message-ID: <20251127120902.292555-1-vladimir.oltean@nxp.com> (raw)
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
next reply other threads:[~2025-11-27 12:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 12:08 Vladimir Oltean [this message]
2025-11-27 12:08 ` [PATCH net-next 01/15] net: dsa: introduce the dsa_xmit_port_mask() tagging protocol helper 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
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=20251127120902.292555-1-vladimir.oltean@nxp.com \
--to=vladimir.oltean@nxp.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alsi@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=clement.leger@bootlin.com \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=dqfext@gmail.com \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=george.mccollister@gmail.com \
--cc=hauke@hauke-m.de \
--cc=jonas.gorski@gmail.com \
--cc=kuba@kernel.org \
--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=pabeni@redhat.com \
--cc=sean.wang@mediatek.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