Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-10 Thread Jiri Pirko
Tue, Jan 10, 2017 at 06:58:18PM CET, f.faine...@gmail.com wrote: >On 01/10/2017 01:55 AM, Jiri Pirko wrote: >> Mon, Jan 09, 2017 at 07:06:39PM CET, f.faine...@gmail.com wrote: >>> On 01/09/2017 09:58 AM, Jiri Pirko wrote: Mon, Jan 09, 2017 at 06:42:07PM CET, f.faine...@gmail.com wrote: > O

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-10 Thread Florian Fainelli
On 01/10/2017 01:55 AM, Jiri Pirko wrote: > Mon, Jan 09, 2017 at 07:06:39PM CET, f.faine...@gmail.com wrote: >> On 01/09/2017 09:58 AM, Jiri Pirko wrote: >>> Mon, Jan 09, 2017 at 06:42:07PM CET, f.faine...@gmail.com wrote: On 01/09/2017 08:06 AM, Jiri Pirko wrote: > Mon, Jan 09, 2017 at 04

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-10 Thread Jiri Pirko
Mon, Jan 09, 2017 at 07:06:39PM CET, f.faine...@gmail.com wrote: >On 01/09/2017 09:58 AM, Jiri Pirko wrote: >> Mon, Jan 09, 2017 at 06:42:07PM CET, f.faine...@gmail.com wrote: >>> On 01/09/2017 08:06 AM, Jiri Pirko wrote: Mon, Jan 09, 2017 at 04:45:33PM CET, vivien.dide...@savoirfairelinux.com

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-09 Thread Florian Fainelli
On 01/09/2017 09:58 AM, Jiri Pirko wrote: > Mon, Jan 09, 2017 at 06:42:07PM CET, f.faine...@gmail.com wrote: >> On 01/09/2017 08:06 AM, Jiri Pirko wrote: >>> Mon, Jan 09, 2017 at 04:45:33PM CET, vivien.dide...@savoirfairelinux.com >>> wrote: Hi Jiri, Jiri Pirko writes: >>

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-09 Thread Jiri Pirko
Mon, Jan 09, 2017 at 06:42:07PM CET, f.faine...@gmail.com wrote: >On 01/09/2017 08:06 AM, Jiri Pirko wrote: >> Mon, Jan 09, 2017 at 04:45:33PM CET, vivien.dide...@savoirfairelinux.com >> wrote: >>> Hi Jiri, >>> >>> Jiri Pirko writes: >>> > Extra question: shouldn't phys_port_{id,name} be swit

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-09 Thread Florian Fainelli
On 01/09/2017 08:06 AM, Jiri Pirko wrote: > Mon, Jan 09, 2017 at 04:45:33PM CET, vivien.dide...@savoirfairelinux.com > wrote: >> Hi Jiri, >> >> Jiri Pirko writes: >> Extra question: shouldn't phys_port_{id,name} be switchdev attributes in >>> >>> Again, phys_port_id has nothing to do with sw

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-09 Thread Jiri Pirko
Mon, Jan 09, 2017 at 04:45:33PM CET, vivien.dide...@savoirfairelinux.com wrote: >Hi Jiri, > >Jiri Pirko writes: > >>>Extra question: shouldn't phys_port_{id,name} be switchdev attributes in >> >> Again, phys_port_id has nothing to do with switches. Should be removed >> from dsa because its use the

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-09 Thread Jiri Pirko
Mon, Jan 09, 2017 at 05:00:19PM CET, and...@lunn.ch wrote: >> > No. That should be unique within one switch. In mlxsw we name it "p1", >> > "p2", ... >> > >> > The final netdev names are: >> > enp3s0np1, enp3s0np2, ... >> > >mlxsw are pci devices, so it follows this convention, i think: > > * [P

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-09 Thread Andrew Lunn
> > No. That should be unique within one switch. In mlxsw we name it "p1", > > "p2", ... > > > > The final netdev names are: > > enp3s0np1, enp3s0np2, ... > mlxsw are pci devices, so it follows this convention, i think: * [P]ps[f][n|d] * PCI geographi

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-09 Thread Vivien Didelot
Hi Jiri, Jiri Pirko writes: >>Extra question: shouldn't phys_port_{id,name} be switchdev attributes in > > Again, phys_port_id has nothing to do with switches. Should be removed > from dsa because its use there is incorrect. Florian, since 3a543ef just got in, can it be reverted? >>> I guess t

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-09 Thread Vivien Didelot
Hi Jiri, Jiri Pirko writes: >># cat /etc/udev/rules.d/90-net-dsa.rules >>SUBSYSTEM=="net", ACTION=="add", ENV{DEVTYPE}=="dsa", >> PROGRAM="/lib/udev/dsanitizer $attr{phys_switch_id} $attr{phys_port_id}", >> NAME="$result" > > I know this is kind of confusing, but phys_port_id is to be

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-09 Thread Jiri Pirko
Mon, Jan 09, 2017 at 04:04:50PM CET, vivien.dide...@savoirfairelinux.com wrote: >Hi Jiri, > >Jiri Pirko writes: > >>># cat /etc/udev/rules.d/90-net-dsa.rules >>>SUBSYSTEM=="net", ACTION=="add", ENV{DEVTYPE}=="dsa", >>> PROGRAM="/lib/udev/dsanitizer $attr{phys_switch_id} $attr{phys_port_id

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-08 Thread Jiri Pirko
Mon, Jan 09, 2017 at 12:15:52AM CET, vivien.dide...@savoirfairelinux.com wrote: >In the new DTS bindings for DSA (dsa2), the "ethernet" and "link" >phandles are respectively mandatory and exclusive to CPU port and DSA >link device tree nodes. > >Simplify dsa2.c a bit by checking the presence of suc

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-08 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> Until the printing of netdev_phys_item_id structures is fixed in >> net/core/net-sysfs.c, an external helper can be used like this: > > As Florian pointed out, this cannot be changed. It is now part of the > ABI. We have to live with it printing little endian nu

Re: [PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-08 Thread Andrew Lunn
> Until the printing of netdev_phys_item_id structures is fixed in > net/core/net-sysfs.c, an external helper can be used like this: Hi Vivien As Florian pointed out, this cannot be changed. It is now part of the ABI. We have to live with it printing little endian numbers as big endian. > #

[PATCH net-next v2] net: dsa: make "label" property optional for dsa2

2017-01-08 Thread Vivien Didelot
In the new DTS bindings for DSA (dsa2), the "ethernet" and "link" phandles are respectively mandatory and exclusive to CPU port and DSA link device tree nodes. Simplify dsa2.c a bit by checking the presence of such phandle instead of checking the redundant "label" property. Then the Linux philoso