summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/pensando/ionic/ionic_stats.h
diff options
context:
space:
mode:
authorEric Joyner <eric.joyner@amd.com>2026-06-14 13:53:01 -0700
committerJakub Kicinski <kuba@kernel.org>2026-06-15 18:15:08 -0700
commitcb683ff6ee07ab92701cc45ae21373c2b0c8d481 (patch)
treebbccb5ebebbd5acbed6539e7d3b2dfef2396482a /drivers/net/ethernet/pensando/ionic/ionic_stats.h
parent433bc500814916133db94e55f096ccc01e5faa30 (diff)
downloadlinux-next-cb683ff6ee07ab92701cc45ae21373c2b0c8d481.tar.gz
linux-next-cb683ff6ee07ab92701cc45ae21373c2b0c8d481.zip
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>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic_stats.h')
-rw-r--r--drivers/net/ethernet/pensando/ionic/ionic_stats.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_stats.h b/drivers/net/ethernet/pensando/ionic/ionic_stats.h
index 2a725834f792..7ed935868e84 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_stats.h
+++ b/drivers/net/ethernet/pensando/ionic/ionic_stats.h
@@ -4,6 +4,8 @@
#ifndef _IONIC_STATS_H_
#define _IONIC_STATS_H_
+#define IONIC_STAT_INVALID (cpu_to_le64(~0ULL))
+
#define IONIC_STAT_TO_OFFSET(type, stat_name) (offsetof(type, stat_name))
#define IONIC_STAT_DESC(type, stat_name) { \