]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gve: make nic clock reads thread safe
authorAnkit Garg <nktgrg@google.com>
Thu, 14 May 2026 22:58:41 +0000 (22:58 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 20 May 2026 01:17:27 +0000 (18:17 -0700)
commit4bbcd7e24aaaf6870b0b0d65c7b683f0019aabbe
tree007ccacf6276c28e119ef5aa80a75e78e7b92351
parent55687124a86fb6a747ba099b1257f416faaeb143
gve: make nic clock reads thread safe

Add a mutex to protect the shared DMA buffer that receives NIC
timestamp reports. The NIC timestamp will be read from two different
threads: the periodic worker and upcoming `gettimex64`.

Move clock registration to the last step of initialization to ensure
that all data needed by the clock module is initialized before
the clock is exposed to usermode.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Joshua Washington <joshwash@google.com>
Signed-off-by: Ankit Garg <nktgrg@google.com>
Signed-off-by: Jordan Rhee <jordanrhee@google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
Link: https://patch.msgid.link/20260514225842.110706-3-hramamurthy@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/google/gve/gve.h
drivers/net/ethernet/google/gve/gve_ethtool.c
drivers/net/ethernet/google/gve/gve_ptp.c