Re: [PATCH net-next v8 3/3] gve: implement PTP gettimex64
From: David Woodhouse
Date: Thu May 28 2026 - 13:37:48 EST
On Thu, 2026-05-28 at 09:22 -0700, Jordan Rhee wrote:
>
> > If you *do* believe the hypervisor-provided TSC readings, can't you
> > convert *each* of them to the system clock using
> > get_device_system_crosststamp(), a history from your captured prets,
> > and a get_time_fn callback that just creates xtstamp->sys_counter from
> > the hypervisor-provided TSC value for pre/post respectively, each time
> > you call it?
>
> Thank you David, that's a great idea.
Having now looked closer at your original patch, it's mostly what you
were doing already, isn't it? So I think you're being kind with 'idea'
:)
> We will respin with this approach after
> https://lore.kernel.org/netdev/20260526165826.392227559@xxxxxxxxxx/
> lands.
I don't think that series enables anything fundamental that you need.
It lets you pass actual counter values back *from* the driver callback
via the timestamp, but in your case you already had them anyway. But
still, base on that anyway as your code will need to be reworked fairly
significantly on top of it if you don't.
My version is basically still using get_system_device_crosststamp() in
precisely the same way you were before. I've responded to Thomas
directly about his feedback on that, as I just can't see any reason why
adjust_historical_crosststamp() would exist at all, if what you're
doing here wasn't valid.
The kerneldoc for the @history_begin argument *literally* describes it
as 'Historical reference point used to interpolate system time when the
counter value provided by the driver is before the current interval'.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature