Hi, this is a respin of the Marek series in hope that this time we can finally make some progress with dsa supporting multi-cpu port.
This implementation is similar to the Marek series but with some tweaks. This adds support for multiple-cpu port but leave the driver the decision of the type of logic to use about assigning a CPU port to the various port. The driver can also provide no preference and the CPU port is decided using a round-robin way. (copying the Marek cover letter) Patch 2 adds a new operation to the net device operations structure. Currently we use the iflink property of a net device to report to which CPU port a given switch port si connected to. The ip link utility from iproute2 reports this as "lan1@eth0". We add a new net device operation, ndo_set_iflink, which can be used to set this property. We call this function from the netlink handlers. Patch 3 implements this new ndo_set_iflink operation for DSA slave device. Thus the userspace can request a change of CPU port of a given port. The mac address is changed accordingly following the CPU port mac address. There are at least 2 driver that would benefit from this and currently now works using half their capabilities. (qca8k and mv88e6xxx) This current series is tested with qca8k. Ansuel Smith (1): net: dsa: allow for multiple CPU ports Marek BehĂșn (2): net: add ndo for setting the iflink property net: dsa: implement ndo_set_netlink for chaning port's CPU port include/linux/netdevice.h | 5 +++ include/net/dsa.h | 7 +++++ net/core/dev.c | 15 +++++++++ net/core/rtnetlink.c | 7 +++++ net/dsa/dsa2.c | 66 ++++++++++++++++++++++++++++----------- net/dsa/slave.c | 31 ++++++++++++++++++ 6 files changed, 112 insertions(+), 19 deletions(-) -- 2.30.2