On Mon, 2020-07-06 at 19:07 -0700, Jakub Kicinski wrote:
> On Tue, 7 Jul 2020 01:51:21 +0000 Saeed Mahameed wrote:
> > > Also looks like you report the total number of mcast packets in
> > > ethtool
> > > -S, which should be identical to ip -s? If so please remove
> > > that.  
> > 
> > why ? it is ok to report the same counter both in ehttool and
> > netdev
> > stats.
> 
> I don't think it is, Stephen and I have been trying to catch this in
> review for a while now. It's an entirely unnecessary code
> duplication.

Code duplication shouldn't be a factor. For example, in mlx5 we have a
generic mechanism to define and report stats, for the netdev stats to
be reported in ethtoool all we need to do is define the representing
string and store those counters in the SW stats struct.

> We should steer towards proper APIs first if those exist.
> 
> Using ethtool -S stats gets very messy very quickly in production.

I agree on ethtool getting messy very quickly, but i disagree on not
reporting netdev stats, I don't think the 4 netdev stats are the reason
for messy ethtool.

Ethtool -S is meant for verbosity and debug, and it is full of
driver/HW specific counters, how are you planing to audit all of those
?

We had an idea in the past to allow users to choose what stats groups
to report to ethtool, we can follow up on this if this is something
other drivers might be interested in.

example: 

ethtool -S eth0 --groups XDP,SW,PER_QUEUE,PCI,PORT,DRIVER_SPECIFIC
Where non DRIVER_SPECIFC groups are standardize stats objects.. 

-Saeed.

Reply via email to