iavf_read_phc_indirect(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… iavf_read_phc_indirect(9) πŸ’…

okay bestie, welcome to the Kernel API Manual page for iavf_read_phc_indirect(9) πŸ’–. Yes, the manual name is right here near the top, folded in all cute and official. This is the indirect PHC-time-read situation, and we’re gonna get through it together, no cap.


🌸 NAME 🌸

iavf_read_phc_indirect β€” indirectly read the PHC time via virtchnl ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

int iavf_read_phc_indirect (struct iavf_adapter *adapter , struct
       timespec64 *ts , struct ptp_system_timestamp *sts );

πŸŽ€ ARGUMENTS πŸŽ€

  • adapter β€” private adapter structure; this is the main-character struct we’re working with 🫢
  • ts β€” storage for the timestamp value; the timestamp goes here πŸ’–
  • sts β€” system timestamp values before and after the read; it’s literally the before-and-after system timestamps πŸŽ€

🌈 DESCRIPTION 🌈

okay so here’s the whole vibe: this function is used when the device does not have direct register access to the PHC time. Instead, it indirectly reads the time via VIRTCHNL_OP_1588_PTP_GET_TIME, and waits for the reply from the PF. The way that indirect read has to wait for the PF reply? it’s giving β€œhold on, bestie” energy πŸ’….

Based on some simple measurements using ftrace and phc2sys, this clock access method has about a ~110 usec latency even when the system is not under load. That’s ~110 usec of latency, bestie β€” highkey important to know 😭.

In order to achieve acceptable results when using phc2sys with the indirect clock access method, it is recommended to use more conservative proportional and integration constants with the P/I servo. This is a real recommendation, not a vibe-only suggestion β€” conservative constants with the P/I servo, fr fr 🫢.

⭐ RETURN ⭐

0 if success, error code otherwise. That’s the whole return deal. Periodt. πŸ’–

πŸ”₯ SEE ALSO πŸ”₯

Kernel file: ./drivers/net/ethernet/intel/iavf/iavf_ptp.c

The whole friend group:


🫢 cute sign-off time: source/version is ./drivers/net/ethernet/intel/iavf, the date is October 2026, and this was iavf_read_phc_indirect(9) from the Kernel API Manual. bye bestie, go read that PHC time indirectly πŸ’œ

πŸ“¦ where this page comes from