netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: DSA vs. SWTICHDEV ?
Date: Wed, 30 Nov 2016 16:25:03 +0100	[thread overview]
Message-ID: <20161130152503.GE21645@lunn.ch> (raw)
In-Reply-To: <1480516241.3563.142.camel@infinera.com>

On Wed, Nov 30, 2016 at 02:30:43PM +0000, Joakim Tjernlund wrote:
> On Wed, 2016-11-30 at 14:52 +0100, Andrew Lunn wrote:
> > On Wed, Nov 30, 2016 at 08:50:34AM +0000, Joakim Tjernlund wrote:
> > > I am trying to wrap my head around these two "devices" and have a hard time telling them apart.
> > > We are looking att adding a faily large switch(over PCIe) to our board and from what I can tell
> > > switchdev is the new way to do it but DSA is still there. Is it possible to just list
> > > how they differ?
> > 
> > Hi Joakim
> 
> Hi Andrew, thanks for answering
> 
> > 
> > If the interface you use to send frames from the host to the switch is
> > PCIe, you probably want to use switchdev directly.
> 
> OK, we will have a few ethernet I/F's connected too but I these should be used
> as normal interfaces just interfacing a switch.

That does not make much sense.

Maybe time to backtrack a bit. The Linux concept for switch/router
chips is that they are just hardware accelerators for what Linux can
already do in software. Each port of the switch is just a normal Linux
interface.  ip link show will list each port. ip addr add can be used
to add an IP address to the interface.  You want to switch frames
between two ports: Create a linux bridge and put the interfaces into
it. Via switchdev you get a call into the hardware to accelerate
this. If the hardware cannot accelerate it, it is done in software as
normal.  Want to combine two ports into a trunk: Add a team interface
and make the port interfaces slaves of the team interface. Via
switchdev, you ask the hardware to accelerate this. If it cannot, it
is done in software.

So back your connecting a few host interfaces to the switch. This is
logically putting a cable between two interfaces on the same host. You
are making a loopback. Why do that? Sure it is possible, but it is an
odd architecture.

> And switchdev can do all this over PCIe instead? Can you have a
> switch tree in switchdev too?

Mellonex says so, but i don't think they have actually implemented it.

	 Andrew

  reply	other threads:[~2016-11-30 15:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-30  8:50 DSA vs. SWTICHDEV ? Joakim Tjernlund
2016-11-30 13:52 ` Andrew Lunn
2016-11-30 14:30   ` Joakim Tjernlund
2016-11-30 15:25     ` Andrew Lunn [this message]
2016-11-30 16:35       ` Joakim Tjernlund
2016-11-30 16:55         ` Andrew Lunn
2016-11-30 17:44           ` Joakim Tjernlund
2016-11-30 18:09             ` Andrew Lunn
2016-11-30 20:43               ` Jiri Pirko
2016-11-30 18:10             ` Florian Fainelli
2016-11-30 18:44               ` Joakim Tjernlund
2016-11-30 19:39                 ` Florian Fainelli
2016-12-01 16:50 ` Murali Karicheri
2016-12-01 17:31   ` Andrew Lunn
2016-12-01 21:38     ` Murali Karicheri
2016-12-02 15:38       ` 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=20161130152503.GE21645@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Joakim.Tjernlund@infinera.com \
    --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 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).