Re: [PATCH net-next 8/8] net: dsa: mt7530: implement port_change_conduit op

From: Chester A. Unal

Date: Fri Jun 12 2026 - 06:06:39 EST


On 10/06/2026 20:56, Daniel Golle wrote:
Allow changing the CPU port affinity of user ports at runtime via
the IFLA_DSA_CONDUIT netlink attribute. This updates the port matrix
to forward to the new CPU port instead of the old one.

Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>

Fabulous!

Acked-by: Chester A. Unal <chester.a.unal@xxxxxxxxxx>

---
drivers/net/dsa/mt7530.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index c96420c291d5..2f3e734b9f53 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -3206,6 +3206,34 @@ static int mt753x_set_mac_eee(struct dsa_switch *ds, int port,
return 0;
}
+static int
+mt753x_port_change_conduit(struct dsa_switch *ds, int port,
+ struct net_device *conduit,
+ struct netlink_ext_ack *extack)
+{
+ struct dsa_port *new_cpu_dp = conduit->dsa_ptr;
+ struct dsa_port *dp = dsa_to_port(ds, port);
+ struct mt7530_priv *priv = ds->priv;
+
+ if (priv->id != ID_MT7531)
+ return -EOPNOTSUPP;

Why do we limit this to MT7531 only?

Chester A.