On 1/9/2025 12:43 AM, Andrew Lunn wrote:
On Wed, Jan 08, 2025 at 09:47:20PM +0800, Luo Jie wrote:
The PPE hardware packet counters are made available through
the debugfs entry "/sys/kernel/debug/ppe/packet_counters".
Why?
Would it not be better to make them available via ethtool -S ?
Many of the counters displayed by this debugfs are PPE hardware
counters that are common for all Ethernet ports. For example,
counters such as drops in PPE due to lack of hardware buffers.
Since ethtool -S output is tied to a netdevice, we felt that a
separate debugfs file to display these common counters is better.
The port specific counters will be supported using 'ethtool -S'
along with the netdevice driver that will be posted sequentially
after the conclusion of the review for this series.
You should justify not using standard statistics APIs for what look
like statistic counters. Maybe these don't fit the existing API, and
if so, you should explain why.
Andrew
I will enhance the commit message to justify these debug counters
in the next update. Hope this is fine.