[PATCH 17/20] net: dsa: xilinx: opt into TX forwarding offload on bridge join
Nagadheeraj Rottela
nagadheeraj.rottela at amd.com
Fri Aug 7 03:44:28 PDT 2026
Set *tx_fwd_offload in port_bridge_join. The bridge then sends one
copy via the offloaded TX path and the fabric handles per-port
replication.
The fabric offloads a single bridge across the user ports. Set
ds->max_num_bridges to 1 so the DSA core rejects a second bridge
instead of silently merging the ports.
Signed-off-by: Nagadheeraj Rottela <nagadheeraj.rottela at amd.com>
---
drivers/net/dsa/xilinx/xilinx_tsn.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/net/dsa/xilinx/xilinx_tsn.c b/drivers/net/dsa/xilinx/xilinx_tsn.c
index e48c81f18d6e..9a4d4a2fb892 100644
--- a/drivers/net/dsa/xilinx/xilinx_tsn.c
+++ b/drivers/net/dsa/xilinx/xilinx_tsn.c
@@ -495,6 +495,19 @@ static int xlnx_tsn_port_set_mac_address(struct dsa_switch *ds, int port,
return 0;
}
+static int xlnx_tsn_port_bridge_join(struct dsa_switch *ds, int port,
+ struct dsa_bridge bridge,
+ bool *tx_fwd_offload,
+ struct netlink_ext_ack *extack)
+{
+ /* The switch fabric replicates flooded frames per egress port
+ * on its own, so the bridge does not need to clone-and-send.
+ */
+ *tx_fwd_offload = true;
+
+ return 0;
+}
+
static void xlnx_tsn_port_stp_state_set(struct dsa_switch *ds, int port,
u8 state)
{
@@ -729,6 +742,7 @@ static const struct dsa_switch_ops xlnx_tsn_switch_ops = {
.setup = xlnx_tsn_setup,
.teardown = xlnx_tsn_teardown,
.port_set_mac_address = xlnx_tsn_port_set_mac_address,
+ .port_bridge_join = xlnx_tsn_port_bridge_join,
.port_stp_state_set = xlnx_tsn_port_stp_state_set,
.port_hwtstamp_get = xlnx_tsn_port_hwtstamp_get,
.port_hwtstamp_set = xlnx_tsn_port_hwtstamp_set,
@@ -786,6 +800,9 @@ static int xlnx_tsn_probe(struct platform_device *pdev)
ds->phylink_mac_ops = &xlnx_tsn_phylink_mac_ops;
ds->priv = sw;
+ /* The fabric offloads a single bridge across the user ports. */
+ ds->max_num_bridges = 1;
+
platform_set_drvdata(pdev, sw);
return dsa_register_switch(ds);
--
2.34.1
More information about the linux-arm-kernel
mailing list