All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Mathieu Olivari <mathieu@codeaurora.org>
Cc: netdev@vger.kernel.org, linux@roeck-us.net, jogo@openwrt.org,
	f.fainelli@gmail.com
Subject: Re: RFC: dsa: add support for multiple CPU ports
Date: Tue, 10 Mar 2015 23:50:42 +0100	[thread overview]
Message-ID: <20150310225042.GA14112@lunn.ch> (raw)
In-Reply-To: <20150310221340.GA6465@codeaurora.org>

> > I had a different solution in mind for multiple CPU ports. I've no
> > idea if it actually works though, i've not had time to investigate.
> > It would actually put the host CPU ports into a switch trunk, and use
> > team/bond driver on the host. You then get one logical 2Gbp link to
> > the switch and run DSA over that.
> > 
> 
> I could see it working on the Tx path - as the destination port is specified
> in the header -, but on the Rx path, how would the switch figure out which
> CPU port it should send the packet to?
>
> These switches doesn't have a concept of bonding, so this decision is generally
> based on the internal ARL table, and is automatically learnt by looking at the
> src MAC@ of the incoming packets.

All Marvell switches, and according to Florian SF2 and B53 support
trunk groups. I assume the switch does load balancing between ports in
a trunk. On the CPU you can then use the header to determine which
port the packet came from.

> When using bonding, the switch would see both eth0 & eth1 MAC@ on both of
> its CPU ports. The destination CPU port would be unexpected at best; I could
> see some switches being able to support this, but most of them would not.

At the moment, this is purely an idea. I do have two boards where i
can test it out with Marvell devices, once i get some spare time.
Florian might be able to comment about SF2 and B53, if we thinks
trunking and broadcom tags can be combined.

> At the very least, we would need to treat "dsa,ethernet" as an array,
> and specify the list of ethernet device node that connects to the switch.

True.

> I still think putting this information in the port section makes sense,
> as it represents the board layout more accurately than having a global
> node at a dsa level.

Yes, it does make sense to have it in port. But to keep backwards
compatibility, we need at keep dsa,ethernet, with at least one
interface.

	Andrew

  reply	other threads:[~2015-03-10 22:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 19:01 RFC: dsa: add support for multiple CPU ports Mathieu Olivari
2015-03-10 19:21 ` Andrew Lunn
2015-03-10 22:13   ` Mathieu Olivari
2015-03-10 22:50     ` Andrew Lunn [this message]
2015-03-10 19:31 ` Andrew Lunn
2015-03-10 20:42   ` Mathieu Olivari
2015-03-10 21:13     ` Andrew Lunn
2015-03-10 22:53       ` Mathieu Olivari
2015-03-11  1:47         ` David Miller
2015-03-11 13:07       ` Jiri Pirko
2015-03-11  0:01     ` Florian Fainelli
2015-03-11  1:18       ` Mathieu Olivari
2015-03-11 13:30         ` Andrew Lunn
2015-03-11 23:37           ` Mathieu Olivari
2015-03-12  0:19             ` Andrew Lunn
2015-03-13  1:57               ` Mathieu Olivari

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=20150310225042.GA14112@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=jogo@openwrt.org \
    --cc=linux@roeck-us.net \
    --cc=mathieu@codeaurora.org \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.