gve: Add rx hardware timestamp expansion
authorJohn Fraker <jfraker@google.com>
Sat, 14 Jun 2025 00:07:52 +0000 (00:07 +0000)
committerJakub Kicinski <kuba@kernel.org>
Mon, 16 Jun 2025 22:27:24 +0000 (15:27 -0700)
commit3bf5431fef750d5081731b53f2a5c324bcff6c3a
tree7dd1b52ad83a7e4a2d768264eed30812bc123bf6
parentc51b7bf84091cc7fe4e51411caa9b886956081b0
gve: Add rx hardware timestamp expansion

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@google.com>
Signed-off-by: Ziwei Xiao <ziweixiao@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
Link: https://patch.msgid.link/20250614000754.164827-7-hramamurthy@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/google/gve/gve_rx_dqo.c