Subject: Re: [PATCH 2/4] net: ionic: Add PHC state page for user space access

From: Jakub Kicinski <[email-masked]>
Date: Sun, 12 Apr 2026 07:52:14 -0700

On Fri, 10 Apr 2026 19:44:18 -0400 Allen Hubbe wrote:
> On 4/10/2026 4:43 PM, Jakub Kicinski wrote:
> > On Fri, 10 Apr 2026 09:10:09 -0400 Allen Hubbe wrote:  
> >> The simple answer is just following the same approach as an existing
> >> implementation.  See struct mlx5_ib_clock_info and
> >> mlx5_update_clock_info_page().
> >>
> >> Making this common might risk presuming that other implementations will
> >> be a similar design.  Compare these to the sfc driver.  The clock is
> >> quite different from ionic and mlx5, not using timecounter, because
> >> instead of a free-running cycle counter the hardware itself provides an
> >> adjustable clock for timestamping.  
> > 
> > So your augment is basically that drivers which don't use sw timecounter
> > exist so we shouldn't bother creating common definitions for drivers
> > that do? Why do we have common implementation of timecounter in the
> > kernel at all then?
> > 
> > These are rhetorical questions.  
> 
> There is no suggestion to get rid of timecounter in the kernel.
> 
> Maybe I've been overthinking this and misunderstood your first reply. 
> Did you mean, just, why not move this to ib_user_verbs.h, struct 
> ib_uverbs_phc_state, and use it from the vendor driver?

I think so, just drop the ionic from the names and pop it into a header
that won't be awkward to reuse by other vendors.