]> Gentwo Git Trees - linux/.git/commitdiff
net: dsa: a5psw: use simple HSR offload helpers
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 30 Nov 2025 13:16:55 +0000 (15:16 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 2 Dec 2025 00:45:08 +0000 (16:45 -0800)
The "a5psw" tagging protocol uses dsa_xmit_port_mask(), which means
we can offload HSR packet duplication on transmit. Enable that feature.

Cc: "Clément Léger" <clement.leger@bootlin.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20251130131657.65080-14-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/rzn1_a5psw.c

index 1635255f58e4bbd8fb21908cce332b9711691aaf..4d857e3be10b95afa752d32378950156e91b2524 100644 (file)
@@ -1035,6 +1035,8 @@ static const struct dsa_switch_ops a5psw_switch_ops = {
        .port_fdb_add = a5psw_port_fdb_add,
        .port_fdb_del = a5psw_port_fdb_del,
        .port_fdb_dump = a5psw_port_fdb_dump,
+       .port_hsr_join = dsa_port_simple_hsr_join,
+       .port_hsr_leave = dsa_port_simple_hsr_leave,
 };
 
 static int a5psw_mdio_wait_busy(struct a5psw *a5psw)