]> git.ipfire.org Git - thirdparty/linux.git/commit
gve: Add Rx HWTS metadata to AF_XDP ZC mode
authorTim Hostetler <thostet@google.com>
Fri, 14 Nov 2025 21:11:46 +0000 (13:11 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 18 Nov 2025 14:52:43 +0000 (15:52 +0100)
commit1b42e07af1ee65d10ee72f90d6fbd02a9b53208c
treecd5f768f547c9feb310e91adf1ac9b21246dd65b
parent66adaf1021282edcb9be50bea5ea5aa78afda527
gve: Add Rx HWTS metadata to AF_XDP ZC mode

By overlaying the struct gve_xdp_buff on top of the struct xdp_buff_xsk
that AF_XDP utilizes, the driver records the 32 bit timestamp via the
completion descriptor and the cached 64 bit NIC timestamp via gve_priv.

The driver's implementation of xmo_rx_timestamp extends the timestamp to
the full and up to date 64 bit timestamp and returns it to the user.

gve_rx_xsk_dqo is modified to accept a pointer to the completion
descriptor and no longer takes a buf_len explicitly as it can be pulled
out of the descriptor.

With this patch gve now supports bpf_xdp_metadata_rx_timestamp.

Signed-off-by: Tim Hostetler <thostet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
Link: https://patch.msgid.link/20251114211146.292068-5-joshwash@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/google/gve/gve_main.c
drivers/net/ethernet/google/gve/gve_rx_dqo.c