Re: [PATCH 2/4] net: ionic: Add PHC state page for user space access
From: Allen Hubbe
Date: Fri Apr 10 2026 - 09:16:28 EST
On 4/1/2026 8:06 PM, Jakub Kicinski wrote:
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
On Wed, 1 Apr 2026 15:54:59 +0530 Abhijit Gangurde wrote:
diff --git a/include/uapi/rdma/ionic-abi.h b/include/uapi/rdma/ionic-abi.h
index 7b589d3e9728..97f695510380 100644
--- a/include/uapi/rdma/ionic-abi.h
+++ b/include/uapi/rdma/ionic-abi.h
@@ -112,4 +112,15 @@ struct ionic_srq_resp {
__aligned_u64 rq_cmb_offset;
};
+struct ionic_phc_state {
+ __u32 seq;
+ __u32 rsvd;
+ __aligned_u64 mask;
+ __aligned_u64 tick;
+ __aligned_u64 nsec;
+ __aligned_u64 frac;
+ __u32 mult;
+ __u32 shift;
+};
You're just exposing kernel timecounter internals.
Why is this ionic uAPI and not something reusable by other drivers?
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.