STRUCT VIORTC_PTP_CLOCK(9)
π struct viortc_ptp_clock(9) β the Kernel API Manual glow-up π
okay so bestie, welcome to the struct viortc_ptp_clock(9) page from the Kernel API Manual β¨ this is the PTP clock abstraction, and honestly? it's giving "small struct, big responsibilities." let's get into it π
πΈ NAME πΈ
struct viortc_ptp_clock β the PTP clock abstraction, aka the little bundle that keeps your Precision Time Protocol clock and your virtio_rtc device on speaking terms π«Ά
β¨ SYNOPSIS β¨
struct viortc_ptp_clock {
struct ptp_clock *ptp_clock;
struct viortc_dev *viortc;
struct ptp_clock_info ptp_info;
u16 vio_clk_id;
bool have_cross;
};
like, that's the whole vibe. five members. no cap. π
π¦ Members π¦
ptp_clockβ the PTP clock handle π and yeah, it's the one you hand over when you're unregistering. it's literally the "remember me so you can let me go" field πviortcβ the virtio_rtc device data π your device's whole personality lives here.ptp_infoβ the PTP clock description π the actual "who am I, what can I do" of the clock.vio_clk_idβ the virtio_rtc clock id π₯ au16, nice and tidy, so you know exactly which clock you're talking about.have_crossβ aboolthat says whether the device supports crosststamp with an available HW counter β like, "do we have the hardware counter? yes or no, no in-between." main character energy fr fr.
π§ SEE ALSO π§
lowkey the whole friend group is here, go say hi π
Kernel file ./drivers/virtio/virtio_rtc_ptp.c struct viortc_ptp_cross_ctx(9), viortc_ptp_get_time_fn(9), viortc_ptp_do_xtstamp(9), viortc_ptp_getcrosststamp(9), viortc_ptp_unregister(9), viortc_ptp_get_cross_cap(9), viortc_ptp_register(9)
bestie reminder: read the friends too, iykyk π the struct doesn't explain itself in a vacuum.
and that's the page!! π source/version vibes: ./drivers/virtio, dated October 2026, filed under struct viortc_ptp_clock(9) β slay, go register some clocks, periodt π
π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms