Skip to content

RFC Multi-CPU DSA support

Ansuel Smith lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 46 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net: dsa: allow for multiple CPU portsinclude/net/dsa.h net/dsa/dsa2.c+54 -194 replies
2/3net: add ndo for setting the iflink propertyinclude/linux/netdevice.h net/core/dev.c net/core/rtnetlink.c+27 -00 replies
3/3net: dsa: implement ndo_set_netlink for chaning port's CPU portnet/dsa/slave.c+31 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC net-next 0/3] Multi-CPU DSA support

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(-)
Signature · 1 line
2.30.2