All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@savoirfairelinux.com, f.fainelli@gmail.com,
	andrew@lunn.ch, privat@egil-hjelmeland.no, john@phrozen.org,
	Woojung.Huh@microchip.com, sean.wang@mediatek.com,
	nikita.yoush@cogentembedded.com, cphealy@gmail.com
Subject: Re: [PATCH net-next v2 00/10] net: dsa: add generic debugfs interface
Date: Wed, 30 Aug 2017 09:40:36 +0200	[thread overview]
Message-ID: <20170830074036.GA1903@nanopsycho> (raw)
In-Reply-To: <87ziai4b99.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>

Tue, Aug 29, 2017 at 05:57:54PM CEST, vivien.didelot@savoirfairelinux.com wrote:
>Hi David, Jiri,
>
>Jiri Pirko <jiri@resnulli.us> writes:
>
>> Tue, Aug 29, 2017 at 06:38:37AM CEST, davem@davemloft.net wrote:
>>>From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
>>>Date: Mon, 28 Aug 2017 15:17:38 -0400
>>>
>>>> This patch series adds a generic debugfs interface for the DSA
>>>> framework, so that all switch devices benefit from it, e.g. Marvell,
>>>> Broadcom, Microchip or any other DSA driver.
>>>
>>>I've been thinking this over and I agree with the feedback given that
>>>debugfs really isn't appropriate for this.
>>>
>>>Please create a DSA device class, and hang these values under
>>>appropriate sysfs device nodes that can be easily found via
>>>/sys/class/dsa/ just as easily as they would be /sys/kernel/debug/dsa/
>>>
>>>You really intend these values to be consistent across DSA devices,
>>>and you don't intend to go willy-nilly changig these exported values
>>>arbitrarily over time.  That's what debugfs is for, throw-away
>>>stuff.
>>>
>>>So please make these proper device sysfs attributes rather than
>>>debugfs.
>>
>> As I wrote, I believe that there is a big overlap with devlink and its
>> dpipe subset. I think that primary we should focus on extending whatever
>> is needed for dsa there. The iface should be generic for all drivers,
>> not only dsa. dsa-specific sysfs attributes should be last-resort solution,
>> I believe we can avoid them.
>
>Please note that this interface is only meant to provide a _debug_ and
>_development_ interface to DSA users. It is enableable at compile time
>and can be ditched anytime we want, in contrary to other interfaces
>which cannot be broken or changed because they are part of the ABI.
>
>I see sysfs as a script-friendly way to access and configure kernel
>structures, so I agree with Jiri that it doesn't seem appropriate.
>
>Extending devlink is a good option for long term, but it'll take a bit
>of time to extend data structures and not duplicate stats and regs
>accesses for ports which have a net device attached to it or not.
>
>In the meantime, I didn't find anything more useful and easier to debug
>a switch fabric than dumping side-by-side stats of all ports part of the
>data plane, for example like this:

So in the meantime, if you need some quick ugly think, you can always
have it out of the tree. Sorry but these are just excuses :/


>
>    # watch -n1 pr -mt {switch0/port5,switch0/port6,switch1/port5,switch1/port3}/stats
>
>where ports 5 and 6 of both switches are DSA/CPU ports (without net
>devices attached to them) and port3 is a user port. This way one can
>easily see where and why packets get dropped.
>
>We could keep this interface and simply ditch net/dsa/debugfs.c when a
>convenient devlink alternative is in place.
>
>
>Thanks,
>
>        Vivien

      reply	other threads:[~2017-08-30  7:40 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 19:17 [PATCH net-next v2 00/10] net: dsa: add generic debugfs interface Vivien Didelot
2017-08-28 19:17 ` [PATCH net-next v2 01/10] net: dsa: add " Vivien Didelot
2017-08-28 19:50   ` Jiri Pirko
2017-08-28 19:58     ` Florian Fainelli
2017-08-28 20:05       ` Jiri Pirko
2017-08-28 20:19   ` Andrew Lunn
2017-09-07 19:34   ` Greg KH
2017-09-08 13:58     ` Vivien Didelot
2017-09-14 19:59       ` Maxim Uvarov
2017-09-14 20:12         ` Alexander Duyck
2017-09-14 21:01           ` Andrew Lunn
2017-09-15  5:51             ` Jiri Pirko
2017-09-15  7:35               ` Egil Hjelmeland
2017-09-15 14:08               ` Andrew Lunn
2017-09-15 14:26                 ` Jiri Pirko
2017-09-15 15:19                   ` Andrew Lunn
2017-08-28 19:17 ` [PATCH net-next v2 02/10] net: dsa: debugfs: add tree Vivien Didelot
2017-09-08 14:18   ` Vivien Didelot
2017-09-08 14:40     ` Greg Kroah-Hartman
2017-09-08 14:57   ` Vivien Didelot
2017-09-08 15:03     ` David Laight
2017-09-08 15:29     ` Greg Kroah-Hartman
2017-08-28 19:17 ` [PATCH net-next v2 03/10] net: dsa: debugfs: add tag_protocol Vivien Didelot
2017-08-28 20:16   ` Andrew Lunn
2017-08-28 19:17 ` [PATCH net-next v2 04/10] net: dsa: debugfs: add port stats Vivien Didelot
2017-08-28 19:17 ` [PATCH net-next v2 05/10] net: dsa: debugfs: add port regs Vivien Didelot
2017-08-28 19:17 ` [PATCH net-next v2 06/10] net: dsa: debugfs: add port fdb Vivien Didelot
2017-08-28 19:17 ` [PATCH net-next v2 07/10] net: dsa: restore mdb dump Vivien Didelot
2017-08-28 19:17 ` [PATCH net-next v2 08/10] net: dsa: debugfs: add port mdb Vivien Didelot
2017-08-28 19:17 ` [PATCH net-next v2 09/10] net: dsa: restore VLAN dump Vivien Didelot
2017-08-28 19:17 ` [PATCH net-next v2 10/10] net: dsa: debugfs: add port vlan Vivien Didelot
2017-08-28 19:53 ` [PATCH net-next v2 00/10] net: dsa: add generic debugfs interface Jiri Pirko
2017-08-28 20:08   ` Andrew Lunn
2017-08-29  6:25     ` Jiri Pirko
2017-08-29 12:50       ` Andrew Lunn
2017-08-29 19:05         ` Arkadi Sharshevsky
2017-08-29 19:19           ` Florian Fainelli
2017-08-29 20:27             ` Andrew Lunn
2017-08-30  7:43         ` Jiri Pirko
2017-08-29  4:38 ` David Miller
2017-08-29  6:29   ` Jiri Pirko
2017-08-29 15:57     ` Vivien Didelot
2017-08-30  7:40       ` Jiri Pirko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170830074036.GA1903@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=Woojung.Huh@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=john@phrozen.org \
    --cc=kernel@savoirfairelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikita.yoush@cogentembedded.com \
    --cc=privat@egil-hjelmeland.no \
    --cc=sean.wang@mediatek.com \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.