From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Michael Guralnik <michaelgur@nvidia.com>,
netdev@vger.kernel.org, jiri@nvidia.com, ariela@nvidia.com,
maorg@nvidia.com, saeedm@nvidia.com, moshe@nvidia.com
Subject: Re: [RFC PATCH net-next 0/2] devlink: Add port stats
Date: Tue, 12 Apr 2022 10:16:26 +0200 [thread overview]
Message-ID: <YlU1Wrn0zPbYN6pE@nanopsycho> (raw)
In-Reply-To: <20220411110157.7fcecc4b@kernel.org>
Mon, Apr 11, 2022 at 08:01:57PM CEST, kuba@kernel.org wrote:
>On Mon, 11 Apr 2022 12:31:53 +0200 Jiri Pirko wrote:
>> Fri, Apr 08, 2022 at 05:16:38AM CEST, kuba@kernel.org wrote:
>> >On Thu, 7 Apr 2022 11:40:48 +0300 Michael Guralnik wrote:
>> >> This patch set adds port statistics to the devlink port object.
>> >> It allows device drivers to dynamically attach and detach counters from a
>> >> devlink port object.
>> >
>> >The challenge in defining APIs for stats is not in how to wrap a free
>> >form string in a netlink message but how do define values that have
>> >clear semantics and are of value to the user.
>>
>> Wait, does all stats have to be well-defined? I mean, look at the
>> ethtool stats. They are free-form strings too. Do you mean that in
>> devlink, we can only have well-defines enum-based stats?
>
>That's my strong preference, yes.
>
>First, and obvious argument is that it make lazy coding less likely
>(see devlink params).
>
>More importantly, tho, if your stats are not well defined - users don't
>need to seem them. Really! If I can't draw a line between a statistic
>and device behavior then keep that stat in the register dump, debugfs
During the DaveM's-only era, there was quite strict policy against any
debugfs usage. As far as I remember the claim was, find of define the
proper api or do your debug things out-of-tree.
Does that changed? I just want to make sure that we are now free to use
debugfs for exposuse of debugging info as "odd vendor stats".
Personally, I think it is good idea. I think that the rest of the kernel
actually uses debugfs like that.
Thanks!
>or /dev/null.
>
>That's why it's important that we talk about _what_ you're trying to
>expose.
Basically a mixture of quite generic things and very obscure device
specific items.
next prev parent reply other threads:[~2022-04-12 10:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 8:40 [RFC PATCH net-next 0/2] devlink: Add port stats Michael Guralnik
2022-04-07 8:40 ` [RFC PATCH net-next 1/2] devlink: Introduce stats to the port object Michael Guralnik
2022-04-07 8:40 ` [RFC PATCH net-next 2/2] devlink: Add statistics to port get Michael Guralnik
2022-04-08 3:16 ` [RFC PATCH net-next 0/2] devlink: Add port stats Jakub Kicinski
2022-04-11 10:28 ` Jiri Pirko
2022-04-11 17:49 ` Jakub Kicinski
2022-04-11 10:31 ` Jiri Pirko
2022-04-11 18:01 ` Jakub Kicinski
2022-04-12 8:16 ` Jiri Pirko [this message]
2022-04-12 15:34 ` Jakub Kicinski
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=YlU1Wrn0zPbYN6pE@nanopsycho \
--to=jiri@resnulli.us \
--cc=ariela@nvidia.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=maorg@nvidia.com \
--cc=michaelgur@nvidia.com \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox