lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251127120902.292555-1-vladimir.oltean@nxp.com>
Date: Thu, 27 Nov 2025 14:08:47 +0200
From: Vladimir Oltean <vladimir.oltean@....com>
To: netdev@...r.kernel.org
Cc: Andrew Lunn <andrew@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Alvin Šipraga <alsi@...g-olufsen.dk>,
	Clément Léger <clement.leger@...tlin.com>,
	Daniel Golle <daniel@...rotopia.org>,
	David Yang <mmyangfl@...il.com>,
	DENG Qingfang <dqfext@...il.com>,
	Florian Fainelli <florian.fainelli@...adcom.com>,
	George McCollister <george.mccollister@...il.com>,
	Hauke Mehrtens <hauke@...ke-m.de>,
	Jonas Gorski <jonas.gorski@...il.com>,
	Kurt Kanzenbach <kurt@...utronix.de>,
	Linus Walleij <linus.walleij@...aro.org>,
	linux-renesas-soc@...r.kernel.org,
	Sean Wang <sean.wang@...iatek.com>,
	UNGLinuxDriver@...rochip.com,
	Woojung Huh <woojung.huh@...rochip.com>
Subject: [PATCH net-next 00/15] Introduce the dsa_xmit_port_mask() tagging protocol helper

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@...g-olufsen.dk>
Cc: Chester A. Unal" <chester.a.unal@...nc9.com>
Cc: "Clément Léger" <clement.leger@...tlin.com>
Cc: Daniel Golle <daniel@...rotopia.org>
Cc: David Yang <mmyangfl@...il.com>
Cc: DENG Qingfang <dqfext@...il.com>
Cc: Florian Fainelli <florian.fainelli@...adcom.com>
Cc: George McCollister <george.mccollister@...il.com>
Cc: Hauke Mehrtens <hauke@...ke-m.de>
Cc: Jonas Gorski <jonas.gorski@...il.com>
Cc: Kurt Kanzenbach <kurt@...utronix.de>
Cc: Linus Walleij <linus.walleij@...aro.org>
Cc: linux-renesas-soc@...r.kernel.org
Cc: Sean Wang <sean.wang@...iatek.com>
Cc: UNGLinuxDriver@...rochip.com
Cc: Woojung Huh <woojung.huh@...rochip.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ