Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, mkubecek@suse.cz,
	michael.chan@broadcom.com, tariqt@nvidia.com, saeedm@nvidia.com,
	alexander.duyck@gmail.com, andrew@lunn.ch
Subject: Re: [PATCH net-next v2 0/8] ethtool: add pause frame stats
Date: Sat, 12 Sep 2020 10:16:12 +0300	[thread overview]
Message-ID: <20200912071612.cq7adzzxxgpcauux@skbuf> (raw)
In-Reply-To: <20200911174246.76466eec@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On Fri, Sep 11, 2020 at 05:42:46PM -0700, Jakub Kicinski wrote:
> > The ethtool -S framework was nice because you could append to the
> > counters of the master interface while not losing them.
> > As for "ethtool -A", those parameters are fixed as part of the
> > fixed-link device tree node corresponding to the CPU port.
>
> I think I'm missing the problem you're trying to describe.
> Are you making a general comment / argument on ethtool stats?

No, it appears to me that you're trying to standardize some things out
of ethtool -S. I just want to make sure that, while doing so, you are
aware of some of the more subtle uses of that interface.

> Pause stats are symmetrical - as can be seen in your quote
> what's RX for the CPU is TX for the switch, and vice versa.

If things work, yes. If they don't, no.

> Since ethtool -A $cpu_mac controls whether CPU netdev generates
> and accepts pause frames, correspondingly the direction and meaning
> of pause statistics on that interface is well defined.

Well, with a fixed-link, there's not a lot you can change with "ethtool
--pause" (the link is managed with phylink). Up until now, I have mostly
only heard of links between a DSA master and the CPU port that are not
fixed-link. In theory (and in limited practice), phylink can even drive
a PHY on the CPU port, so in that case, it may make sense for DSA to try
to automatically apply the mirror pause frame configuration of the
master. However, that wasn't supported before, either, and was not what
I was talking about.

> You can still append your custom CPU port stats to ethtool -S or
> debugfs or whatnot,

I don't understand, so you're saying that DSA can keep pause stats
reporting in "ethtool -S", but the rest of devices should move to
"ethtool -a"? You know that a typical switching chip will report the
same statistics counters on all ports, including the ones that do have a
net_device, right?  So DSA gets a waiver from implementing
.get_pause_stats()?

> but those are only useful for validating that the configuration of the
> CPU port is not completely broken. Otherwise the counters are
> symmetrical. A day-to-day user of the device doesn't need to see both
> of them.

A day-to-day user shouldn't need to look at ethtool -S or any other
statistics for that matter, either. If they need to look at flow control
on the CPU port they'd better get the full story rather than half of it.

Sorry for the non-constructive answer. Like Florian said, it would be
nice to have some built-in mechanism for this new ndo that DSA could use
to keep annotating its own stats.

Thanks,
-Vladimir

  parent reply	other threads:[~2020-09-12  7:16 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 23:28 [PATCH net-next v2 0/8] ethtool: add pause frame stats Jakub Kicinski
2020-09-11 23:28 ` [PATCH net-next v2 1/8] ethtool: add standard pause stats Jakub Kicinski
2020-09-14  1:48   ` Andrew Lunn
2020-09-14 15:48     ` Jakub Kicinski
2020-09-14 17:18       ` Andrew Lunn
2020-09-14 18:58         ` Jakub Kicinski
2020-09-11 23:28 ` [PATCH net-next v2 2/8] docs: net: include the new ethtool pause stats in the stats doc Jakub Kicinski
2020-09-14 19:33   ` Saeed Mahameed
2020-09-14 19:52     ` Jakub Kicinski
2020-09-14 21:19       ` Saeed Mahameed
2020-09-11 23:28 ` [PATCH net-next v2 3/8] netdevsim: add pause frame stats Jakub Kicinski
2020-09-11 23:28 ` [PATCH net-next v2 4/8] selftests: add a test for ethtool pause stats Jakub Kicinski
2020-09-11 23:28 ` [PATCH net-next v2 5/8] bnxt: add pause frame stats Jakub Kicinski
2020-09-11 23:28 ` [PATCH net-next v2 6/8] ixgbe: " Jakub Kicinski
2020-09-11 23:28 ` [PATCH net-next v2 7/8] mlx5: " Jakub Kicinski
2020-09-12  1:10   ` Jakub Kicinski
2020-09-13  8:16   ` kernel test robot
2020-09-11 23:28 ` [PATCH net-next v2 8/8] mlx4: " Jakub Kicinski
2020-09-11 23:49 ` [PATCH net-next v2 0/8] ethtool: " Vladimir Oltean
2020-09-12  0:07   ` Jakub Kicinski
2020-09-12  0:15     ` Vladimir Oltean
2020-09-12  0:42       ` Jakub Kicinski
2020-09-12  2:54         ` Florian Fainelli
2020-09-14 15:53           ` Jakub Kicinski
2020-09-14 16:25             ` Florian Fainelli
2020-09-14 16:54               ` Jakub Kicinski
2020-09-14 17:36             ` Andrew Lunn
2020-09-14 19:20               ` Jakub Kicinski
2020-09-12  7:16         ` Vladimir Oltean [this message]
2020-09-14 16:15           ` Jakub Kicinski
2020-09-14 17:28             ` Andrew Lunn
2020-09-14 19:36               ` Jakub Kicinski
2020-09-14  2:08   ` Andrew Lunn
2020-09-14 16:26     ` Jakub Kicinski
2020-09-14 20:05 ` Saeed Mahameed

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=20200912071612.cq7adzzxxgpcauux@skbuf \
    --to=olteanv@gmail.com \
    --cc=alexander.duyck@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@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