netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	David <davem@davemloft.net>, Guenter Roeck <linux@roeck-us.net>,
	Cory Tusar <cory.tusar@pid1solutions.com>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH 3/3] net: dsa: Allow configuration of CPU & DSA port speeds/duplex
Date: Thu, 18 Jun 2015 03:11:59 +0200	[thread overview]
Message-ID: <20150618011159.GA22072@lunn.ch> (raw)
In-Reply-To: <536480200.118000.1434564592107.JavaMail.zimbra@savoirfairelinux.com>

On Wed, Jun 17, 2015 at 02:09:52PM -0400, Vivien Didelot wrote:
> Hi Andrew, All,
> 
> On 12/06/15 10:18, Andrew Lunn wrote:
> > By default, DSA and CPU ports are configured to the maximum speed the
> > switch supports. However there can be use cases where the peer device
> > port is slower. Allow a fixed-link property to be used with the DSA
> > and CPU port in the device tree, and use this information to configure
> > the port.
> 
> Would it be a good idea for DSA to expose the "cpu" port to userspace as well?
> That way, it'd be possible to use ethtool to set the port speed and duplex
> mode, or dump registers (this would have saved me quite some time in dev).

I have code which expose these via debugfs. So far, i have all
registers, stats, ATU, and the scratch registers. For the patches to
apply cleanly, they depend on these patches, so i've not posted them
yet.

I'm not strongly against having a CPU port, but i don't particularly
like having the CPU port as an interface. And when you get to cascaded
switches, the DSA ports are also interesting, so should we also have a
netdev for them? But they are equally useless for transferring frames
from the host as the CPU port. This is why i went for debugfs.

> 
> Also, in my RFC for 802.1Q support [1], I assume the CPU port to be a tagged
> member of each VLAN. But someone may want to add a VLAN with swp3 and swp4
> only, and another VLAN with swp0, swp1 and the CPU port. Am I correct?

The DSA concept is that switch ports are separate interfaces. So
adding a VLAN to two ports does to automatically bridge those ports
together. You need to add them to a bridge as well before VLAN tagged
frames are bridged between ports.

       Andrew

  reply	other threads:[~2015-06-18  1:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 17:18 [PATCH 1/3] net: phy: Allow PHY devices to identify themselves as Ethernet switches, etc Andrew Lunn
2015-06-12 17:18 ` [PATCH 2/3] dsa: mv88e6xxx: Allow speed/duplex of port to be configured Andrew Lunn
2015-06-12 17:18 ` [PATCH 3/3] net: dsa: Allow configuration of CPU & DSA port speeds/duplex Andrew Lunn
2015-06-12 18:03   ` Guenter Roeck
2015-06-12 18:14   ` Florian Fainelli
2015-06-12 18:29     ` Guenter Roeck
2015-06-15 17:32       ` Florian Fainelli
2015-06-12 18:38     ` Andrew Lunn
2015-06-15 17:35   ` Florian Fainelli
2015-06-17 18:09     ` Vivien Didelot
2015-06-18  1:11       ` Andrew Lunn [this message]
2015-06-19 15:05         ` Vivien Didelot
2015-06-19 15:05           ` Andrew Lunn
2015-06-19 15:48             ` Vivien Didelot

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=20150618011159.GA22072@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=cory.tusar@pid1solutions.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux@roeck-us.net \
    --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).