Re: [PATCH v5 net-next 3/3] net: mscc: ocelot: use bulk reads for stats

Vladimir Oltean
2022-02-08T16:10:37Z

On Tue, Feb 08, 2022 at 08:07:42AM -0800, Colin Foster wrote:
> # ethtool -S swp1 | head -n 5
> NIC statistics:
> tx_packets: 942
> tx_bytes: 48984
> rx_packets: 764
> rx_bytes: 37808
> # ethtool -S swp2 | head -n 5
> NIC statistics:
> tx_packets: 946
> tx_bytes: 49192
> rx_packets: 1
> rx_bytes: 46
> # ethtool -S swp3 | head -n 5
> NIC statistics:
> tx_packets: 1
> tx_bytes: 52
> rx_packets: 1699
> rx_bytes: 80658
> # ethtool -S swp4 | head -n 5
> NIC statistics:
> tx_packets: 0
> tx_bytes: 0
> rx_packets: 0
> rx_bytes: 0

I understand what confused you now. These are software counters patched
in by dsa_slave_get_ethtool_stats(). They are in no way the counters
from felix_info :: stats_layout, please compare the strings!