[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+h21hpBKnueT0QrVDL=Hhcp9X0rnaPW8omxiegq4TkcQ18EVQ@mail.gmail.com>
Date: Sat, 24 Aug 2019 18:40:48 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Marek Behún <marek.behun@....cz>
Cc: netdev <netdev@...r.kernel.org>, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
David Ahern <dsahern@...il.com>,
Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support
Hi Marek,
On Sat, 24 Aug 2019 at 05:43, Marek Behún <marek.behun@....cz> wrote:
>
> Hi,
> this is my attempt to solve the multi-CPU port issue for DSA.
>
> Patch 1 adds code for handling multiple CPU ports in a DSA switch tree.
> If more than one CPU port is found in a tree, the code assigns CPU ports
> to user/DSA ports in a round robin way. So for the simplest case where
> we have one switch with N ports, 2 of them of type CPU connected to eth0
> and eth1, and the other ports labels being lan1, lan2, ..., the code
> assigns them to CPU ports this way:
> lan1 <-> eth0
> lan2 <-> eth1
> lan3 <-> eth0
> lan4 <-> eth1
> lan5 <-> eth0
> ...
>
> 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@...0". 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.
>
> I am also sending patch for iproute2-next, to add support for setting
> this iflink value.
>
> Marek
>
The topic is interesting.
This changeset leaves the reader wanting to see a driver
implementation of .port_change_cpu_port. (mostly to understand what
your hardware is capable of)
Will DSA assume that all CPU ports are equal in terms of tagging
protocol abilities? There are switches where one of the CPU ports can
do tagging and the other can't.
Is the static assignment between slave and CPU ports going to be the
only use case? What about link aggregation? Flow steering perhaps?
And like Andrew pointed out, how do you handle the receive case? What
happens to flooded frames, will the switch send them to both CPU
interfaces, and get received twice in Linux? How do you prevent that?
> Marek Behún (3):
> net: dsa: allow for multiple CPU ports
> 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 | 11 ++++-
> net/core/dev.c | 15 +++++++
> net/core/rtnetlink.c | 7 ++++
> net/dsa/dsa2.c | 84 +++++++++++++++++++++++++--------------
> net/dsa/slave.c | 35 ++++++++++++++++
> 6 files changed, 126 insertions(+), 31 deletions(-)
>
> --
> 2.21.0
>
Regards,
-Vladimir
Powered by blists - more mailing lists