STRUCT VIORTC_PTP_CLOCK(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 πŸ”₯ a u16, nice and tidy, so you know exactly which clock you're talking about.
  • have_cross β€” a bool that 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