]> git.ipfire.org Git - thirdparty/linux.git/commit
ionic: Report "rx_bits_phy" stat to ethtool
authorEric Joyner <eric.joyner@amd.com>
Sun, 14 Jun 2026 20:53:01 +0000 (13:53 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 16 Jun 2026 01:15:08 +0000 (18:15 -0700)
commitcb683ff6ee07ab92701cc45ae21373c2b0c8d481
treebbccb5ebebbd5acbed6539e7d3b2dfef2396482a
parent433bc500814916133db94e55f096ccc01e5faa30
ionic: Report "rx_bits_phy" stat to ethtool

This stat contains the number of total bits that the PHY has received;
it's useful for BER calculations. Add it to the ethtool stats output.

However, since this is one of the new "extra port stats", it's reported
in a different manner than the existing port stats and only
conditionally added to the ethtool stats output list: both the
DEV_CAP_EXTRA_STATS capability must be supported by the firmware, and
the firmware must set the value of the statistic to something other than
IONIC_STAT_INVALID.

To help support this scheme, the extra port stats region is initialized to
0xff's/IONIC_STAT_INVALID by the driver, to ensure the statistics that
the driver knows about but the firmware does not are still invalid
to the driver.

Signed-off-by: Eric Joyner <eric.joyner@amd.com>
Link: https://patch.msgid.link/20260614205303.48088-4-eric.joyner@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic_dev.h
drivers/net/ethernet/pensando/ionic/ionic_main.c
drivers/net/ethernet/pensando/ionic/ionic_stats.c
drivers/net/ethernet/pensando/ionic/ionic_stats.h