]> git.ipfire.org Git - thirdparty/linux.git/commit
net: mana: Expose additional hardware counters for drop and TC via ethtool.
authorDipayaan Roy <dipayanroy@linux.microsoft.com>
Mon, 9 Jun 2025 10:01:03 +0000 (03:01 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 10 Jun 2025 21:23:19 +0000 (14:23 -0700)
commitc09ef59e17c6921c577d54bc8da4331b955d01a7
treecfa61a6fd4a0497b71a26d6f53ea91dae6fbc4b4
parenta63bea11d45523c7ed9f7b927532c810ad52db36
net: mana: Expose additional hardware counters for drop and TC via ethtool.

Add support for reporting additional hardware counters for drop and
TC using the ethtool -S interface.

These counters include:

- Aggregate Rx/Tx drop counters
- Per-TC Rx/Tx packet counters
- Per-TC Rx/Tx byte counters
- Per-TC Rx/Tx pause frame counters

The counters are exposed using ethtool_ops->get_ethtool_stats and
ethtool_ops->get_strings. This feature/counters are not available
to all versions of hardware.

Signed-off-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>
Reviewed-by: Subbaraya Sundeep <sbhatta@marvell.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Link: https://patch.msgid.link/20250609100103.GA7102@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microsoft/mana/hw_channel.c
drivers/net/ethernet/microsoft/mana/mana_en.c
drivers/net/ethernet/microsoft/mana/mana_ethtool.c
include/net/mana/mana.h