From: Andrew Lunn <andrew@lunn.ch>
To: John Crispin <john@phrozen.org>
Cc: "David S. Miller" <davem@davemloft.net>,
Florian Fainelli <f.fainelli@gmail.com>,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
netdev@vger.kernel.org
Subject: Re: [RFC 3/4] net-next: dsa: Add support for multiple cpu ports.
Date: Wed, 4 Jan 2017 15:01:05 +0100 [thread overview]
Message-ID: <20170104140105.GL10768@lunn.ch> (raw)
In-Reply-To: <1483515484-21793-4-git-send-email-john@phrozen.org>
On Wed, Jan 04, 2017 at 08:38:03AM +0100, John Crispin wrote:
> From: Andrew Lunn <andrew@lunn.ch>
>
> Some boards have two CPU interfaces connected to the switch, e.g. WiFi
> access points, with 1 port labeled WAN, 4 ports labeled lan1-lan4, and
> two port connected to the SoC.
>
> This patch extends DSA to allows both CPU ports to be used. The "cpu"
> node in the DSA tree can now have a phandle to the host interface it
> connects to. Each user port can have a phandle to a cpu port which
> should be used for traffic between the port and the CPU. Thus simple
> load sharing over the two CPU ports can be achieved.
>
> Signed-off-by: John Crispin <john@phrozen.org>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> include/net/dsa.h | 21 ++++++++++++++++++++-
> net/dsa/dsa2.c | 36 ++++++++++++++++++++++++++++++------
> net/dsa/dsa_priv.h | 5 +++++
> net/dsa/slave.c | 27 ++++++++++++++++-----------
> 4 files changed, 71 insertions(+), 18 deletions(-)
>
> diff --git a/include/net/dsa.h b/include/net/dsa.h
> index b122196..f68180b 100644
> --- a/include/net/dsa.h
> +++ b/include/net/dsa.h
> @@ -60,6 +60,8 @@ struct dsa_chip_data {
> */
> char *port_names[DSA_MAX_PORTS];
> struct device_node *port_dn[DSA_MAX_PORTS];
> + struct net_device *port_ethernet[DSA_MAX_PORTS];
> + int port_cpu[DSA_MAX_PORTS];
Hi John
My proof of concept patches have "bit rotted" a bit. When implementing
dsa2, i removed the use of dsa_chip_data, aka cd, from all the drivers
and the new binding does not use it at all. I don't want to add it
back again. When Florain removes the old binding in 6 months time, i
expect dsa_chip_data and dsa_platform_data will be removed.
I would be tempted to put these two members into the dsa_port
structure.
Andrew
next prev parent reply other threads:[~2017-01-04 14:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-04 7:38 [RFC 0/4] net-next: dsa: add support for multiple cpu ports John Crispin
2017-01-04 7:38 ` [RFC 1/4] Documentation: devicetree: add multiple cpu port DSA binding John Crispin
2017-01-04 12:58 ` Andrew Lunn
2017-01-04 7:38 ` [RFC 2/4] net-next: dsa: Refactor DT probing of a switch port John Crispin
2017-01-04 13:30 ` Andrew Lunn
2017-01-04 7:38 ` [RFC 3/4] net-next: dsa: Add support for multiple cpu ports John Crispin
2017-01-04 13:22 ` Andrew Lunn
2017-01-04 14:01 ` Andrew Lunn [this message]
2017-01-04 14:40 ` Florian Fainelli
2017-01-04 15:22 ` Andrew Lunn
2017-01-04 7:38 ` [RFC 4/4] net-next: dsa: qca8k: add " John Crispin
2017-01-04 14:12 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170104140105.GL10768@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=john@phrozen.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).