Thread (15 messages) 15 messages, 5 authors, 2025-02-14

RE: [PATCH v6 net-next 3/4] net: ena: Add PHC documentation

From: "Arinzon, David" <darinzon@amazon.com>
Date: 2025-02-10 15:28:24

quoted
+PHC can be monitored using :code:`ethtool -S` counters:
+
+=================
======================================================
quoted
+**phc_cnt**         Number of successful retrieved timestamps (below
expire timeout).
quoted
+**phc_exp**         Number of expired retrieved timestamps (above
expire timeout).
quoted
+**phc_skp**         Number of skipped get time attempts (during block
period).
quoted
+**phc_err**         Number of failed get time attempts (entering into block
state).
quoted
+=================
======================================================

ethtool -S is for networking counters.
--
pw-bot: cr
Hi Jakub,

You are right in the regard that it is not a network specific functionality.
Having said that, PHC is a network card capability, making it a network-related component rather than purely a timekeeping feature.
Moreover we failed to find an existing tool which would allow users to get valuable feedback of the system's overall health.

Researching its existing support in the kernel we noted that:
- PHC is embedded in network NIC and is supported by multiple NIC vendors in the kernel
- PHC information is visible through ethtool -T
- The Linux networking stack uses PHC for timekeeping as well as for packet timestamping (via SO_TIMESTAMPING).
  Packet timestamping statistics are available through ethtool get_ts_stats hook

We have found `ethtool -S` as a suitable location for exposing these statistics, which are unique to the ENA NIC.

We'd appreciate your thoughts on the matter, is there an alternative tool you can recommend?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help