Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: realtek: use simple HSR offload helpers

All known Realtek protocols: "rtl4a", "rtl8_4" and "rtl8_4t" use
dsa_xmit_port_mask(), so they are compatible with accelerating TX packet
duplication for HSR rings.

Enable that feature by setting the port_hsr_join() and port_hsr_leave()
operations to the simple helpers provided by DSA.

Cc: "Alvin Šipraga" <alsi@bang-olufsen.dk>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20251130131657.65080-9-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Vladimir Oltean and committed by
Jakub Kicinski
6db31942 4b65d445

+4
+2
drivers/net/dsa/realtek/rtl8365mb.c
··· 2134 2134 .get_stats64 = rtl8365mb_get_stats64, 2135 2135 .port_change_mtu = rtl8365mb_port_change_mtu, 2136 2136 .port_max_mtu = rtl8365mb_port_max_mtu, 2137 + .port_hsr_join = dsa_port_simple_hsr_join, 2138 + .port_hsr_leave = dsa_port_simple_hsr_leave, 2137 2139 }; 2138 2140 2139 2141 static const struct realtek_ops rtl8365mb_ops = {
+2
drivers/net/dsa/realtek/rtl8366rb.c
··· 1815 1815 .port_fast_age = rtl8366rb_port_fast_age, 1816 1816 .port_change_mtu = rtl8366rb_change_mtu, 1817 1817 .port_max_mtu = rtl8366rb_max_mtu, 1818 + .port_hsr_join = dsa_port_simple_hsr_join, 1819 + .port_hsr_leave = dsa_port_simple_hsr_leave, 1818 1820 }; 1819 1821 1820 1822 static const struct realtek_ops rtl8366rb_ops = {