STRUCT IDPF_PTP(9)
π struct idpf_ptp(9) π
okay bestie, welcome to the Kernel API Manual β¨ and today's main character is struct idpf_ptp β literally the PTP parameters struct, no cap. if you're deep in the idpf driver and you need to know what all these fields are for, this is your page. iykyk π«Ά
β¨ SYNOPSIS β¨
here's the whole struct, exactly as it lives, don't touch anything, just vibe:
struct idpf_ptp {
struct ptp_clock_info info;
struct ptp_clock *clock;
struct idpf_adapter *adapter;
u64 base_incval;
u64 max_adj;
struct idpf_ptp_cmd cmd;
u64 cached_phc_time;
unsigned long cached_phc_jiffies;
struct idpf_ptp_dev_clk_regs dev_clk_regs;
u32 caps;
enum idpf_ptp_access get_dev_clk_time_access:2;
enum idpf_ptp_access get_cross_tstamp_access:2;
enum idpf_ptp_access set_dev_clk_time_access:2;
enum idpf_ptp_access adj_dev_clk_time_access:2;
enum idpf_ptp_access tx_tstamp_access:2;
u8 rsv;
struct idpf_ptp_secondary_mbx secondary_mbx;
spinlock_t read_dev_clk_lock;
};
π Members π
okay so every single field, one by one, with the lore π
infoβ the structure that defines the PTP hardware capabilities. it's giving "what can this clock even do" energy.clockβ a pointer to the registered PTP clock device. this is the actual clock bestie, we stan.adapterβ a back pointer to the adapter. yes it points back, it's loyal like that π«Άbase_incvalβ the base increment value of the PTP clock. icon behavior.max_adjβ the maximum adjustment of the PTP clock. the ceiling, the limit, the boundary.cmdβ HW specific command masks. hardware said "here are my masks" and we're like slay.cached_phc_timeβ a cached copy of the PHC time, used for timestamp extension. a little time capsule πcached_phc_jiffiesβ the jiffies whencached_phc_timewas last updated. so you know how fresh that cache is, fr fr.dev_clk_regsβ the set of registers to access the device clock. registers said lemme introduce myself β¨capsβ PTP capabilities negotiated with the Control Plane. negotiated! like a whole business deal went down.get_dev_clk_time_accessβ the access type for getting the device clock time.get_cross_tstamp_accessβ the access type for the cross timestamping.set_dev_clk_time_accessβ the access type for setting the device clock time.adj_dev_clk_time_accessβ the access type for the adjusting the device clock. (yes that grammar is literally what the page says, keeping it π)tx_tstamp_accessβ the access type for the Tx timestamp value read.rsvβ reserved bits. they're just sitting there, reserved, minding their business πsecondary_mbxβ the parameters for using the dedicated PTP mailbox. dedicated! special! main character energy πread_dev_clk_lockβ the spinlock protecting access to the device clock read operation executed by the HW latch. it's the bouncer at the door, no cap π
π SEE ALSO π
if you want the whole friend group, it's all in the Kernel file ./drivers/net/ethernet/intel/idpf/idpf_ptp.h β go read:
- struct
idpf_ptp_cmd(9) - enum
idpf_ptp_access(9) - struct
idpf_ptp_secondary_mbx(9) - enum
idpf_ptp_tx_tstamp_state(9) - struct
idpf_ptp_tx_tstamp_status(9) - struct
idpf_ptp_tx_tstamp(9) - struct
idpf_ptp_vport_tx_tstamp_caps(9) idpf_ptp_info_to_adapter(9)- struct
idpf_ptp_dev_timers(9) idpf_ptp_is_vport_tx_tstamp_ena(9)idpf_ptp_is_vport_rx_tstamp_ena(9)
okay that's the whole page bestie, you ate that π this came from the kernel source at ./drivers/net/ethernet/intel/idpf, dated October 2026 β go off, and remember: timestamp responsibly πβ¨
π¦ 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