[PATCH net-next v2 0/3] gve: add support for PTP gettimex64

Harshitha Ramamurthy posted 3 patches 6 days, 18 hours ago
drivers/net/ethernet/google/gve/gve.h        |   6 +-
drivers/net/ethernet/google/gve/gve_adminq.c |  26 ++-
drivers/net/ethernet/google/gve/gve_adminq.h |   4 +-
drivers/net/ethernet/google/gve/gve_ptp.c    | 209 +++++++++++++++++--
4 files changed, 220 insertions(+), 25 deletions(-)
[PATCH net-next v2 0/3] gve: add support for PTP gettimex64
Posted by Harshitha Ramamurthy 6 days, 18 hours ago
From: Jordan Rhee <jordanrhee@google.com>

This patch series adds support to obtain near-simultaneous NIC and
system timestamps with gettimex64. This enables daemons like
chrony and phc2sys to synchronize the system clock to the NIC clock.

GVE does not have direct register access to the NIC hardware clock, so
it must issue an AdminQ command to read the NIC clock. Due to relatively
high latency of AQ commands (~100us), it is necessary for the hypervisor
to sample the system time sandwich inside the AQ command.

The first two patches pave the way for the PTP implementation by
quieting excessive logging and refactoring an existing routine for
thread safety.

When tested inside a GCE C3 VM, this enabled chrony to synchronize the
NIC clock and system clock with sub-microsecond precision.

chronyc tracking
Reference ID    : 50484330 (PHC0)
Stratum         : 1
Ref time (UTC)  : Sat Feb 14 01:53:42 2026
System time     : 0.000000001 seconds fast of NTP time
Last offset     : -0.000000000 seconds
RMS offset      : 0.000000001 seconds
Frequency       : 0.686 ppm fast
Residual freq   : -0.000 ppm
Skew            : 0.001 ppm
Root delay      : 0.000000001 seconds
Root dispersion : 0.000000812 seconds
Update interval : 0.5 seconds
Leap status     : Normal

---
Changelog:
V2:
- Fixed compilation warning on ARM by casting to u64

V1: https://lore.kernel.org/netdev/20260323234829.3185051-1-hramamurthy@google.com/
---

Ankit Garg (1):
  gve: make nic clock reads thread safe

Jordan Rhee (2):
  gve: skip error logging for retryable AdminQ commands
  gve: implement PTP gettimex64

 drivers/net/ethernet/google/gve/gve.h        |   6 +-
 drivers/net/ethernet/google/gve/gve_adminq.c |  26 ++-
 drivers/net/ethernet/google/gve/gve_adminq.h |   4 +-
 drivers/net/ethernet/google/gve/gve_ptp.c    | 209 +++++++++++++++++--
 4 files changed, 220 insertions(+), 25 deletions(-)


base-commit: 5446b8691eb8278f10deca92048fad84ffd1e4d5
-- 
2.53.0.1018.g2bb0e51243-goog