Re: [PATCH net-next v4 5/8] gve: Add support to query the nic clock

From: Vadim Fedorenko
Date: Tue Jun 10 2025 - 05:50:25 EST


On 09/06/2025 19:40, Harshitha Ramamurthy wrote:
From: Kevin Yang <yyd@xxxxxxxxxx>

Query the nic clock and store the results. The timestamp delivered
in descriptors has a wraparound time of ~4 seconds so 250ms is chosen
as the sync cadence to provide a balance between performance, and
drift potential when we do start associating host time and nic time.

Leverage PTP's aux_work to query the nic clock periodically.

Signed-off-by: Kevin Yang <yyd@xxxxxxxxxx>
Signed-off-by: John Fraker <jfraker@xxxxxxxxxx>
Signed-off-by: Tim Hostetler <thostet@xxxxxxxxxx>
Signed-off-by: Ziwei Xiao <ziweixiao@xxxxxxxxxx>
Reviewed-by: Willem de Bruijn <willemb@xxxxxxxxxx>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@xxxxxxxxxx>
---
Changes in v4:
- release the ptp in the error path of gve_init_clock (Jakub Kicinski)

Changes in v2:
- Utilize the ptp's aux_work instead of delayed_work (Jakub Kicinski,
Vadim Fedorenko)
---

Reviewed-by: Vadim Fedorenko <vadim.fedorenko@xxxxxxxxx>