Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-15 Thread Andrew Lunn
> > Reg cpu lan0lan1lan2lan3lan4lan5 global0 global1 > >- > >00: 4e07 4d044d044d044d044d044d04 0 > >01: 403e 003d003d003d003d003d

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-15 Thread Jiri Pirko
Fri, Sep 15, 2017 at 04:08:39PM CEST, and...@lunn.ch wrote: >> Could you put together your requirements so we can work it out to extend >> devlink to support them? > >As i've said multiple times, generic two dimensional tables. Examples >could look like: > >Stats cpu lan0

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-15 Thread Andrew Lunn
> Could you put together your requirements so we can work it out to extend > devlink to support them? As i've said multiple times, generic two dimensional tables. Examples could look like: Stats cpu lan0 lan1 lan2 lan3 lan4dsa

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-15 Thread Egil Hjelmeland
On 15. sep. 2017 07:51, Jiri Pirko wrote: > Thu, Sep 14, 2017 at 11:01:32PM CEST, and...@lunn.ch wrote: >>> Can you clarify what type of registers it is you are wanting to read? >>> We already have ethtool which is meant to allow reading the device >>> registers for a given netdev. As long as the

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-14 Thread Jiri Pirko
Thu, Sep 14, 2017 at 11:01:32PM CEST, and...@lunn.ch wrote: >> Can you clarify what type of registers it is you are wanting to read? >> We already have ethtool which is meant to allow reading the device >> registers for a given netdev. As long as the port has a netdev >> associated it then there

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-14 Thread Andrew Lunn
> Can you clarify what type of registers it is you are wanting to read? > We already have ethtool which is meant to allow reading the device > registers for a given netdev. As long as the port has a netdev > associated it then there is no need to be getting into debugfs since > we should probably

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-14 Thread Alexander Duyck
On Thu, Sep 14, 2017 at 12:59 PM, Maxim Uvarov wrote: > debugfs here is very very useful to read registers directly and > compare what use space tools see. Cool feature to get regs by port and > use standard tools to diff and print them. Even might be better to > allow drivers

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-14 Thread Maxim Uvarov
debugfs here is very very useful to read registers directly and compare what use space tools see. Cool feature to get regs by port and use standard tools to diff and print them. Even might be better to allow drivers to decode register names and bits values. Once that is done driver mainaince will

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-08 Thread Vivien Didelot
Hi Greg, Greg KH writes: > I agree you shouldn't be using debugfs for this, but in the future, if > you do write debugfs code, please take the following review into > account: Humm sorry I may not have given enough details. This was really meant for debug and dev

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-07 Thread Greg KH
I agree you shouldn't be using debugfs for this, but in the future, if you do write debugfs code, please take the following review into account: On Mon, Aug 28, 2017 at 03:17:39PM -0400, Vivien Didelot wrote: > +static int dsa_debugfs_create_port(struct dsa_switch *ds, int port) > +{ > +

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-08-28 Thread Andrew Lunn
On Mon, Aug 28, 2017 at 03:17:39PM -0400, Vivien Didelot wrote: > This commit adds a DEBUG_FS dependent DSA core file creating a generic > debug filesystem interface for the DSA switch devices. > > The interface can be mounted with: > > # mount -t debugfs none /sys/kernel/debug > > The dsa

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-08-28 Thread Jiri Pirko
Mon, Aug 28, 2017 at 09:58:12PM CEST, f.faine...@gmail.com wrote: >On 08/28/2017 12:50 PM, Jiri Pirko wrote: >> Mon, Aug 28, 2017 at 09:17:39PM CEST, vivien.dide...@savoirfairelinux.com >> wrote: >>> This commit adds a DEBUG_FS dependent DSA core file creating a generic >>> debug filesystem

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-08-28 Thread Florian Fainelli
On 08/28/2017 12:50 PM, Jiri Pirko wrote: > Mon, Aug 28, 2017 at 09:17:39PM CEST, vivien.dide...@savoirfairelinux.com > wrote: >> This commit adds a DEBUG_FS dependent DSA core file creating a generic >> debug filesystem interface for the DSA switch devices. >> >> The interface can be mounted

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-08-28 Thread Jiri Pirko
Mon, Aug 28, 2017 at 09:17:39PM CEST, vivien.dide...@savoirfairelinux.com wrote: >This commit adds a DEBUG_FS dependent DSA core file creating a generic >debug filesystem interface for the DSA switch devices. > >The interface can be mounted with: > ># mount -t debugfs none /sys/kernel/debug >

[PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-08-28 Thread Vivien Didelot
This commit adds a DEBUG_FS dependent DSA core file creating a generic debug filesystem interface for the DSA switch devices. The interface can be mounted with: # mount -t debugfs none /sys/kernel/debug The dsa directory contains one directory per switch chip: # cd