Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Andrew Lunn
On Tue, May 30, 2017 at 05:16:27PM -0700, Florian Fainelli wrote: > On 05/30/2017 05:06 PM, Andrew Lunn wrote: > >> - past the initial setup, if we start creating bridge devices and so on, > >> we have no way to tell: group Ports 0-3 together and send traffic to CPU > >> port 0, then let Port 5

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Andrew Lunn
On Tue, May 30, 2017 at 05:16:27PM -0700, Florian Fainelli wrote: > On 05/30/2017 05:06 PM, Andrew Lunn wrote: > >> - past the initial setup, if we start creating bridge devices and so on, > >> we have no way to tell: group Ports 0-3 together and send traffic to CPU > >> port 0, then let Port 5

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
On 05/30/2017 05:06 PM, Andrew Lunn wrote: >> - past the initial setup, if we start creating bridge devices and so on, >> we have no way to tell: group Ports 0-3 together and send traffic to CPU >> port 0, then let Port 5 alone and send traffic to CPU port 1, that's a >> DSA-only problem though,

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
On 05/30/2017 05:06 PM, Andrew Lunn wrote: >> - past the initial setup, if we start creating bridge devices and so on, >> we have no way to tell: group Ports 0-3 together and send traffic to CPU >> port 0, then let Port 5 alone and send traffic to CPU port 1, that's a >> DSA-only problem though,

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Andrew Lunn
> - past the initial setup, if we start creating bridge devices and so on, > we have no way to tell: group Ports 0-3 together and send traffic to CPU > port 0, then let Port 5 alone and send traffic to CPU port 1, that's a > DSA-only problem though, because we still have the CPU port(s) as >

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Andrew Lunn
> - past the initial setup, if we start creating bridge devices and so on, > we have no way to tell: group Ports 0-3 together and send traffic to CPU > port 0, then let Port 5 alone and send traffic to CPU port 1, that's a > DSA-only problem though, because we still have the CPU port(s) as >

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
+Jiri, Ido, On 05/30/2017 03:44 AM, John Crispin wrote: > 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

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
+Jiri, Ido, On 05/30/2017 03:44 AM, John Crispin wrote: > 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

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Vivien Didelot
Hi John, Vivien Didelot writes: >> +int port_cpu = ds->ports[port].upstream; > > ds->ports[port] is p->dp. I misread this part, p is not yet allocated in that chunk, please ignore this one comment ;-) Thanks, Vivien

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Vivien Didelot
Hi John, Vivien Didelot writes: >> +int port_cpu = ds->ports[port].upstream; > > ds->ports[port] is p->dp. I misread this part, p is not yet allocated in that chunk, please ignore this one comment ;-) Thanks, Vivien

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Vivien Didelot
Hi John, John Crispin writes: > +static inline bool dsa_is_upstream_port(struct dsa_switch *ds, int p) > +{ > + return dsa_is_cpu_port(ds, p) || dsa_is_dsa_port(ds, p); > +} This looks confusing to me. What DSA calls an "upstream" port for the moment is the port which

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Vivien Didelot
Hi John, John Crispin writes: > +static inline bool dsa_is_upstream_port(struct dsa_switch *ds, int p) > +{ > + return dsa_is_cpu_port(ds, p) || dsa_is_dsa_port(ds, p); > +} This looks confusing to me. What DSA calls an "upstream" port for the moment is the port which goes to the CPU

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
On 05/30/2017 12:15 PM, Florian Fainelli wrote: > Hi John, > > On 05/30/2017 11:37 AM, John Crispin wrote: >> Hi, >> >> the patch series is based on net-next from 12 hours ago and works fine >> on that tree. I compile and runtime tested it quite intensively on >> various boards > > The warning

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
On 05/30/2017 12:15 PM, Florian Fainelli wrote: > Hi John, > > On 05/30/2017 11:37 AM, John Crispin wrote: >> Hi, >> >> the patch series is based on net-next from 12 hours ago and works fine >> on that tree. I compile and runtime tested it quite intensively on >> various boards > > The warning

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
Hi John, On 05/30/2017 11:37 AM, John Crispin wrote: > Hi, > > the patch series is based on net-next from 12 hours ago and works fine > on that tree. I compile and runtime tested it quite intensively on > various boards The warning is legit though: 572if (dsa_port_is_cpu(port))

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
Hi John, On 05/30/2017 11:37 AM, John Crispin wrote: > Hi, > > the patch series is based on net-next from 12 hours ago and works fine > on that tree. I compile and runtime tested it quite intensively on > various boards The warning is legit though: 572if (dsa_port_is_cpu(port))

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread John Crispin
Hi, the patch series is based on net-next from 12 hours ago and works fine on that tree. I compile and runtime tested it quite intensively on various boards John On 30/05/17 17:38, kbuild test robot wrote: Hi John, [auto build test ERROR on net-next/master] [also build test ERROR on

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread John Crispin
Hi, the patch series is based on net-next from 12 hours ago and works fine on that tree. I compile and runtime tested it quite intensively on various boards John On 30/05/17 17:38, kbuild test robot wrote: Hi John, [auto build test ERROR on net-next/master] [also build test ERROR on

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread kbuild test robot
Hi John, [auto build test ERROR on net-next/master] [also build test ERROR on next-20170530] [cannot apply to v4.12-rc3] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread kbuild test robot
Hi John, [auto build test ERROR on net-next/master] [also build test ERROR on next-20170530] [cannot apply to v4.12-rc3] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread John Crispin
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

[PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread John Crispin
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