git: 66972c472261 - stable/15 - ixgbe: Expose EEE LPI event counters
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 24 Aug 2026 00:53:49 UTC
The branch stable/15 has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=66972c47226128ed56e0258d7873f2fde72ad44a
commit 66972c47226128ed56e0258d7873f2fde72ad44a
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-10 15:12:43 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-24 00:51:35 +0000
ixgbe: Expose EEE LPI event counters
X550-family devices provide clear-on-read counters for transmit and
receive Low Power Idle events. Accumulate each register once in the
normal statistics poll and expose the monotonic totals below the eee
sysctl node. Document the counters together with the existing EEE
control.
Obtained from: Intel ix 3.4.39
(cherry picked from commit ff86fd4f36618dacf1628180034c312c70294276)
---
share/man/man4/ix.4 | 8 +++++++-
sys/dev/ixgbe/if_ix.c | 18 ++++++++++++++++++
sys/dev/ixgbe/ixgbe_type.h | 2 ++
3 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/share/man/man4/ix.4 b/share/man/man4/ix.4
index 33b723c0fcd2..7177f0f9c962 100644
--- a/share/man/man4/ix.4
+++ b/share/man/man4/ix.4
@@ -29,7 +29,7 @@
.\"
.\" * Other names and brands may be claimed as the property of others.
.\"
-.Dd August 8, 2026
+.Dd August 10, 2026
.Dt IX 4
.Os
.Sh NAME
@@ -242,6 +242,12 @@ Enable firmware logging during driver initialization when set via
.Xr kenv 1 .
.Pp
This feature is only supported on E610 devices.
+.It Va dev.ix.?.eee_state
+Enable or disable Energy Efficient Ethernet on supported devices.
+.It Va dev.ix.?.eee.tx_lpi_count
+Count transmit Low Power Idle events.
+.It Va dev.ix.?.eee.rx_lpi_count
+Count receive Low Power Idle events.
.El
.Sh DIAGNOSTICS
.Bl -diag
diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
index b67d18a2c41d..2db64e5d9a1b 100644
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -2025,6 +2025,12 @@ ixgbe_update_stats_counters(struct ixgbe_softc *sc)
stats->fcoedwtc += IXGBE_READ_REG(hw, IXGBE_FCOEDWTC);
}
+ /* TLPIC and RLPIC are clear-on-read. */
+ if (sc->feat_cap & IXGBE_FEATURE_EEE) {
+ stats->tlpic += IXGBE_READ_REG(hw, IXGBE_TLPIC);
+ stats->rlpic += IXGBE_READ_REG(hw, IXGBE_RLPIC);
+ }
+
/* Fill out the OS statistics structure */
IXGBE_SET_IPACKETS(sc, stats->gprc);
IXGBE_SET_OPACKETS(sc, stats->gptc);
@@ -3669,9 +3675,21 @@ ixgbe_add_device_sysctls(if_ctx_t ctx)
}
if (sc->feat_cap & IXGBE_FEATURE_EEE) {
+ struct sysctl_oid *eee_node;
+ struct sysctl_oid_list *eee_list;
+
SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "eee_state",
CTLTYPE_INT | CTLFLAG_RW, sc, 0,
ixgbe_sysctl_eee_state, "I", "EEE Power Save State");
+
+ eee_node = SYSCTL_ADD_NODE(ctx_list, child, OID_AUTO, "eee",
+ CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
+ "Energy Efficient Ethernet statistics");
+ eee_list = SYSCTL_CHILDREN(eee_node);
+ SYSCTL_ADD_UQUAD(ctx_list, eee_list, OID_AUTO, "tx_lpi_count",
+ CTLFLAG_RD, &sc->stats.pf.tlpic, "TX LPI event count");
+ SYSCTL_ADD_UQUAD(ctx_list, eee_list, OID_AUTO, "rx_lpi_count",
+ CTLFLAG_RD, &sc->stats.pf.rlpic, "RX LPI event count");
}
ixgbe_add_debug_sysctls(sc);
diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h
index cbe7ae019220..0d2cd6757483 100644
--- a/sys/dev/ixgbe/ixgbe_type.h
+++ b/sys/dev/ixgbe/ixgbe_type.h
@@ -3943,6 +3943,8 @@ struct ixgbe_hw_stats {
u64 mlfc;
u64 mrfc;
u64 rlec;
+ u64 tlpic;
+ u64 rlpic;
u64 lxontxc;
u64 lxonrxc;
u64 lxofftxc;