Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-04 Thread nolan
On 06/02/2015 11:53 PM, Scott Feldman wrote: I'm talking about bridging tagged traffic. E.g.: ip link add name br0 type bridge ip link add name br1 type bridge ip link set dev sw1p1 master br0 ip link set dev sw1p2 master br0 ip link set dev sw1p3 master br1 ip link set dev sw1p4 master br1 b

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-03 Thread Florian Fainelli
On 02/06/15 23:53, Scott Feldman wrote: > On Tue, Jun 2, 2015 at 3:31 PM, nolan wrote: >> On 06/02/2015 12:44 AM, Scott Feldman wrote: >>> >>> That brings up an interesting point about having multiple bridges with >>> the same vlan configured. I struggled with that problem with rocker >>> also an

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-03 Thread Guenter Roeck
On 06/03/2015 07:56 AM, Vivien Didelot wrote: Hi Guenter, On Jun 2, 2015, at 10:17 PM, Guenter Roeck li...@roeck-us.net wrote: On Tue, Jun 02, 2015 at 09:39:50PM -0400, Vivien Didelot wrote: Guenter, On Jun 2, 2015, at 2:50 AM, Guenter Roeck li...@roeck-us.net wrote: On 06/01/2015 06:27 PM,

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-03 Thread Vivien Didelot
Hi Guenter, On Jun 2, 2015, at 10:17 PM, Guenter Roeck li...@roeck-us.net wrote: > On Tue, Jun 02, 2015 at 09:39:50PM -0400, Vivien Didelot wrote: >> Guenter, >> >> On Jun 2, 2015, at 2:50 AM, Guenter Roeck li...@roeck-us.net wrote: >> > On 06/01/2015 06:27 PM, Vivien Didelot wrote: >> >> +/*

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-03 Thread Guenter Roeck
On 06/02/2015 11:53 PM, Scott Feldman wrote: On Tue, Jun 2, 2015 at 3:31 PM, nolan wrote: On 06/02/2015 12:44 AM, Scott Feldman wrote: That brings up an interesting point about having multiple bridges with the same vlan configured. I struggled with that problem with rocker also and I don't h

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-02 Thread Scott Feldman
On Tue, Jun 2, 2015 at 3:31 PM, nolan wrote: > On 06/02/2015 12:44 AM, Scott Feldman wrote: >> >> That brings up an interesting point about having multiple bridges with >> the same vlan configured. I struggled with that problem with rocker >> also and I don't have an answer other than "don't do t

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-02 Thread Guenter Roeck
On Tue, Jun 02, 2015 at 09:39:50PM -0400, Vivien Didelot wrote: > Guenter, > > On Jun 2, 2015, at 2:50 AM, Guenter Roeck li...@roeck-us.net wrote: > > On 06/01/2015 06:27 PM, Vivien Didelot wrote: > >> +/* Bringing an interface up adds it to the VLAN 0. Ignore this. */ > >> +if (!vid) > >>

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-02 Thread Vivien Didelot
Guenter, On Jun 2, 2015, at 2:50 AM, Guenter Roeck li...@roeck-us.net wrote: > On 06/01/2015 06:27 PM, Vivien Didelot wrote: >> +/* Bringing an interface up adds it to the VLAN 0. Ignore this. */ >> +if (!vid) >> +return 0; >> + > > Me puzzled ;-). I brought this and the fid quest

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-02 Thread nolan
On 06/02/2015 12:44 AM, Scott Feldman wrote: That brings up an interesting point about having multiple bridges with the same vlan configured. I struggled with that problem with rocker also and I don't have an answer other than "don't do that". Or, better put, if you have multiple bridge on the

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-02 Thread Guenter Roeck
On 06/02/2015 06:42 AM, Andrew Lunn wrote: Also, we already have cases where the switch is connected to the CPU with more than one Ethernet port. It is easy to imagine that the user of such a system might want to configure two bridge groups. Hi Guenter I think that is orthogonal. Having multi

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-02 Thread Andrew Lunn
> Also, we already have cases where the switch is connected to the CPU with > more than one Ethernet port. It is easy to imagine that the user of such > a system might want to configure two bridge groups. Hi Guenter I think that is orthogonal. Having multiple CPU ports should really only be see

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-02 Thread Guenter Roeck
On 06/02/2015 12:44 AM, Scott Feldman wrote: On Mon, Jun 1, 2015 at 11:50 PM, Guenter Roeck wrote: [cut] I brought this up before. No idea if my e-mail got lost or what happened. We use a fid per port, and a fid per bridge group. With VLANs, this is completely ignored, ahd there is only a si

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-02 Thread Andrew Lunn
> +int mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port, u16 vid, > + u16 bridge_flags) > +{ > + struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); > + struct mv88e6xxx_vtu_entry entry = { 0 }; > + int prev_vid = vid ? vid - 1 : 4095; > + int i, ret; >

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-02 Thread Scott Feldman
On Mon, Jun 1, 2015 at 11:50 PM, Guenter Roeck wrote: [cut] > I brought this up before. No idea if my e-mail got lost or what happened. > > We use a fid per port, and a fid per bridge group. With VLANs, this is > completely > ignored, ahd there is only a single fid per vlan for the entire switch

Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops

2015-06-01 Thread Guenter Roeck
Vivien, On 06/01/2015 06:27 PM, Vivien Didelot wrote: This commit implements the port_vlan_add and port_vlan_del functions in the dsa_switch_driver structure for Marvell 88E6xxx compatible switches. This allows to access a switch VLAN Table Unit, and thus define VLANs from standard userspace co