Re: [PATCH net-next v4 6/8] gve: Add rx hardware timestamp expansion

From: Vadim Fedorenko
Date: Tue Jun 10 2025 - 05:51:06 EST


On 09/06/2025 19:40, Harshitha Ramamurthy wrote:
From: John Fraker <jfraker@xxxxxxxxxx>

Allow the rx path to recover the high 32 bits of the full 64 bit rx
timestamp.

Use the low 32 bits of the last synced nic time and the 32 bits of the
timestamp provided in the rx descriptor to generate a difference, which
is then applied to the last synced nic time to reconstruct the complete
64-bit timestamp.

This scheme remains accurate as long as no more than ~2 seconds have
passed between the last read of the nic clock and the timestamping
application of the received packet.

Signed-off-by: John Fraker <jfraker@xxxxxxxxxx>
Signed-off-by: Ziwei Xiao <ziweixiao@xxxxxxxxxx>
Reviewed-by: Willem de Bruijn <willemb@xxxxxxxxxx>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@xxxxxxxxxx>
---
Changes in v3:
- Change the last_read to be u64 (Vadim Fedorenko)

Changes in v2:
- Add the missing READ_ONCE (Joe Damato)
---

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