iavf_ptp_do_aux_work(9)
π iavf_ptp_do_aux_work β a Kernel API Manual moment π
okay so bestie, we're in the <pink>Kernel API Manual</pink> today and the star of the show is iavf_ptp_do_aux_work(9). no cap, this one is lowkey iconic for anyone living that Intel iavf PTP life. π¦
β¨ NAME β¨
iavf_ptp_do_aux_work β do the periodic work that PTP support literally cannot live without π
πΈ SYNOPSIS πΈ
long iavf_ptp_do_aux_work (struct ptp_clock_info *info );
like, that's the whole vibe. one function, one argument, one long coming back atcha. π
π«Ά ARGUMENTS π«Ά
infoβ the PTP clock info structure. that's it, that's the whole argument list. she's the main character here π
π₯ DESCRIPTION π₯
so this is the handler that takes care of the periodic work required for PTP operation. think of it as the little scheduled chore that keeps everything from falling apart. it handles this task:
- updating
cached_phc_timeβ
now let's talk about why that even matters, because it's giving crucial. cached_phc_time is used by the Tx and Rx timestamp flows to perform timestamp extension β and the way it does that is by carefully comparing the timestamp's 32bit nanosecond timestamps and determining the corrected 64bit timestamp value to report to userspace. π§
β οΈ warning bestie: this algorithm only works if cached_phc_time is within ~1 second of the Tx or Rx timestamp event. like, that's the hard limit, no wiggle room, fr fr π
so this task periodically reads the PHC time and stores it, so that timestamp extension keeps operating correctly. she's just showing up on schedule to keep the cache fresh. consistency queen π
π RETURN π
returns the time in jiffies until the periodic task should be re-scheduled. so basically "hey, come get me again in this many jiffies" π
π SEE ALSO π
the kernel file, first of all:
./drivers/net/ethernet/intel/iavf/iavf_ptp.c
and then the whole friend group, because of course there's a friend group: π
iavf_ptp_disable_rx_tstamp(9)iavf_ptp_enable_rx_tstamp(9)iavf_ptp_set_timestamp_mode(9)iavf_ptp_set_ts_config(9)iavf_ptp_cap_supported(9)iavf_allocate_ptp_cmd(9)iavf_queue_ptp_cmd(9)iavf_send_phc_read(9)iavf_read_phc_indirect(9)iavf_ptp_cache_phc_time(9)iavf_ptp_register_clock(9)iavf_ptp_init(9)iavf_ptp_release(9)iavf_ptp_process_caps(9)iavf_ptp_extend_32b_timestamp(9)
and that's the page, bestie!! π this lil gem lives over in ./drivers/net/ethernet/intel/iavf, dated October 2026, straight from the Kernel API Manual β go off, timestamp queen πβ¨
π¦ 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