Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-18 Thread Florian Fainelli
On 05/18/2018 06:45 AM, Andrew Lunn wrote: >> What benefit does it have to register unused ports? What is a usecase >> for them. Like Florian, I also think they should not be registered. > > Hi Jiri > > They physically exist, so we are accurately describing the hardware by > registering them.

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-18 Thread Andrew Lunn
> What benefit does it have to register unused ports? What is a usecase > for them. Like Florian, I also think they should not be registered. Hi Jiri They physically exist, so we are accurately describing the hardware by registering them. Andrew

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Jiri Pirko
Fri, May 18, 2018 at 12:40:17AM CEST, and...@lunn.ch wrote: >On Thu, May 17, 2018 at 03:06:36PM -0700, Florian Fainelli wrote: >> On 05/17/2018 02:08 PM, Andrew Lunn wrote: >> > On Thu, May 17, 2018 at 10:48:55PM +0200, Jiri Pirko wrote: >> >> Thu, May 17, 2018 at 09:14:32PM CEST, f.faine...@gmail.

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Jiri Pirko
Fri, May 18, 2018 at 03:41:37AM CEST, and...@lunn.ch wrote: >> >>> ds = dsa_switch_alloc(&mdiodev->dev, DSA_MAX_PORTS); >> >>> >> >>> It is allocating a switch with 12 ports. However only 4 of them have >> >>> names. So the core only creates slave devices for those 4. >> >>> >> >>> This is

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Andrew Lunn
> >>> ds = dsa_switch_alloc(&mdiodev->dev, DSA_MAX_PORTS); > >>> > >>> It is allocating a switch with 12 ports. However only 4 of them have > >>> names. So the core only creates slave devices for those 4. > >>> > >>> This is a useful test. Real hardware often has unused ports. A WiFi AP > >

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Florian Fainelli
On 05/17/2018 03:40 PM, Andrew Lunn wrote: > On Thu, May 17, 2018 at 03:06:36PM -0700, Florian Fainelli wrote: >> On 05/17/2018 02:08 PM, Andrew Lunn wrote: >>> On Thu, May 17, 2018 at 10:48:55PM +0200, Jiri Pirko wrote: Thu, May 17, 2018 at 09:14:32PM CEST, f.faine...@gmail.com wrote: > O

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Andrew Lunn
On Thu, May 17, 2018 at 03:06:36PM -0700, Florian Fainelli wrote: > On 05/17/2018 02:08 PM, Andrew Lunn wrote: > > On Thu, May 17, 2018 at 10:48:55PM +0200, Jiri Pirko wrote: > >> Thu, May 17, 2018 at 09:14:32PM CEST, f.faine...@gmail.com wrote: > >>> On 05/17/2018 10:39 AM, Jiri Pirko wrote: > >>>

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Florian Fainelli
On 05/17/2018 02:08 PM, Andrew Lunn wrote: > On Thu, May 17, 2018 at 10:48:55PM +0200, Jiri Pirko wrote: >> Thu, May 17, 2018 at 09:14:32PM CEST, f.faine...@gmail.com wrote: >>> On 05/17/2018 10:39 AM, Jiri Pirko wrote: >> That is compiled inside "fixed_phy", isn't it? > > It matches wh

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Andrew Lunn
On Thu, May 17, 2018 at 10:48:55PM +0200, Jiri Pirko wrote: > Thu, May 17, 2018 at 09:14:32PM CEST, f.faine...@gmail.com wrote: > >On 05/17/2018 10:39 AM, Jiri Pirko wrote: > That is compiled inside "fixed_phy", isn't it? > >>> > >>> It matches what CONFIG_FIXED_PHY is, so if it's built-in it

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Jiri Pirko
Thu, May 17, 2018 at 09:14:32PM CEST, f.faine...@gmail.com wrote: >On 05/17/2018 10:39 AM, Jiri Pirko wrote: That is compiled inside "fixed_phy", isn't it? >>> >>> It matches what CONFIG_FIXED_PHY is, so if it's built-in it also becomes >>> built-in, if is modular, it is also modular, this was

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Andrew Lunn
> The platform data assumes there is a network device named "eth0" as the > parent device, yes I know this is terrible, but unfortunately we don't > have anything better at this point That is something we need to solve. With DT, it is easy, we have a phandle to a device, and the name does not matt

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Florian Fainelli
On 05/17/2018 10:39 AM, Jiri Pirko wrote: >>> That is compiled inside "fixed_phy", isn't it? >> >> It matches what CONFIG_FIXED_PHY is, so if it's built-in it also becomes >> built-in, if is modular, it is also modular, this was fixed with >> 40013ff20b1beed31184935fc0aea6a859d4d4ef ("net: dsa: Fix

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Jiri Pirko
Thu, May 17, 2018 at 04:51:17PM CEST, f.faine...@gmail.com wrote: > > >On 05/17/2018 07:30 AM, Jiri Pirko wrote: >> Thu, May 17, 2018 at 04:08:10PM CEST, f.faine...@gmail.com wrote: >>> >>> >>> On 05/17/2018 07:02 AM, Jiri Pirko wrote: Fri, Mar 23, 2018 at 06:09:29PM CET, f.faine...@gmail.com

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Jiri Pirko
Thu, May 17, 2018 at 04:48:28PM CEST, and...@lunn.ch wrote: >> >Yes, modprobe dsa-loop-bdinfo first, which will create the >> >> That is compiled inside "fixed_phy", isn't it? > >Nope. > >It follows a pattern seen with I2C and SPI subsystem. A bus driver >provides a bus to Linux. But i2c and SPI,

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Florian Fainelli
On 05/17/2018 07:30 AM, Jiri Pirko wrote: > Thu, May 17, 2018 at 04:08:10PM CEST, f.faine...@gmail.com wrote: >> >> >> On 05/17/2018 07:02 AM, Jiri Pirko wrote: >>> Fri, Mar 23, 2018 at 06:09:29PM CET, f.faine...@gmail.com wrote: On 03/23/2018 07:49 AM, Jiri Pirko wrote: > Fri, Mar 23, 2

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Andrew Lunn
> >Yes, modprobe dsa-loop-bdinfo first, which will create the > > That is compiled inside "fixed_phy", isn't it? Nope. It follows a pattern seen with I2C and SPI subsystem. A bus driver provides a bus to Linux. But i2c and SPI, unlike PCI or USB, you cannot enumerate the devices on the bus, you

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Jiri Pirko
Thu, May 17, 2018 at 04:08:10PM CEST, f.faine...@gmail.com wrote: > > >On 05/17/2018 07:02 AM, Jiri Pirko wrote: >> Fri, Mar 23, 2018 at 06:09:29PM CET, f.faine...@gmail.com wrote: >>> On 03/23/2018 07:49 AM, Jiri Pirko wrote: Fri, Mar 23, 2018 at 02:30:02PM CET, and...@lunn.ch wrote: > On

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Florian Fainelli
On 05/17/2018 07:02 AM, Jiri Pirko wrote: > Fri, Mar 23, 2018 at 06:09:29PM CET, f.faine...@gmail.com wrote: >> On 03/23/2018 07:49 AM, Jiri Pirko wrote: >>> Fri, Mar 23, 2018 at 02:30:02PM CET, and...@lunn.ch wrote: On Thu, Mar 22, 2018 at 11:55:14AM +0100, Jiri Pirko wrote: > From: Jir

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-05-17 Thread Jiri Pirko
Fri, Mar 23, 2018 at 06:09:29PM CET, f.faine...@gmail.com wrote: >On 03/23/2018 07:49 AM, Jiri Pirko wrote: >> Fri, Mar 23, 2018 at 02:30:02PM CET, and...@lunn.ch wrote: >>> On Thu, Mar 22, 2018 at 11:55:14AM +0100, Jiri Pirko wrote: From: Jiri Pirko Set the attrs and allow to expos

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-03-24 Thread Jiri Pirko
Fri, Mar 23, 2018 at 06:09:29PM CET, f.faine...@gmail.com wrote: >On 03/23/2018 07:49 AM, Jiri Pirko wrote: >> Fri, Mar 23, 2018 at 02:30:02PM CET, and...@lunn.ch wrote: >>> On Thu, Mar 22, 2018 at 11:55:14AM +0100, Jiri Pirko wrote: From: Jiri Pirko Set the attrs and allow to expos

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-03-23 Thread Florian Fainelli
On 03/23/2018 07:49 AM, Jiri Pirko wrote: > Fri, Mar 23, 2018 at 02:30:02PM CET, and...@lunn.ch wrote: >> On Thu, Mar 22, 2018 at 11:55:14AM +0100, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> Set the attrs and allow to expose port flavour to user via devlink. >>> >>> Signed-off-by: Jiri Pirko

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-03-23 Thread Jiri Pirko
Fri, Mar 23, 2018 at 02:30:02PM CET, and...@lunn.ch wrote: >On Thu, Mar 22, 2018 at 11:55:14AM +0100, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Set the attrs and allow to expose port flavour to user via devlink. >> >> Signed-off-by: Jiri Pirko >> --- >> net/dsa/dsa2.c | 23 ++

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-03-23 Thread Andrew Lunn
On Thu, Mar 22, 2018 at 11:55:14AM +0100, Jiri Pirko wrote: > From: Jiri Pirko > > Set the attrs and allow to expose port flavour to user via devlink. > > Signed-off-by: Jiri Pirko > --- > net/dsa/dsa2.c | 23 +++ > 1 file changed, 23 insertions(+) > > diff --git a/net/dsa

Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-03-23 Thread Andrew Lunn
On Thu, Mar 22, 2018 at 11:55:14AM +0100, Jiri Pirko wrote: > From: Jiri Pirko > > Set the attrs and allow to expose port flavour to user via devlink. > > Signed-off-by: Jiri Pirko > --- > net/dsa/dsa2.c | 23 +++ > 1 file changed, 23 insertions(+) > > diff --git a/net/dsa

[patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-03-22 Thread Jiri Pirko
From: Jiri Pirko Set the attrs and allow to expose port flavour to user via devlink. Signed-off-by: Jiri Pirko --- net/dsa/dsa2.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index adf50fbc4c13..49453690696d 100644 --- a/net/dsa/d