i40e_ptp_init(9)
π i40e_ptp_init(9) β like, the Kernel API Manual page, but make it make sense
okay so bestie, welcome to i40e_ptp_init β yes that's the manual page name AND the function name, it's giving "title drop" energy β¨ this one lives in the Kernel API Manual and honestly it's a little technical but we're gonna get through it together, no cap π«Ά
β¨ NAME β¨
i40e_ptp_init β initialize the 1588 support after device probe or reset
like, it's the glow-up routine for your PTP/1588 situation after the device gets probed or yeeted through a reset π
π SYNOPSIS π
void i40e_ptp_init (struct i40e_pf *pf );
that's it, that's the whole vibe. returns nothing (void), takes one thing. simple. iconic. π
πΈ ARGUMENTS πΈ
pfβ the board private structure. yes it's giving "mysterious private structure" main character energy, but that's literally what it is π¦
π§ DESCRIPTION π§
so what does this function actually do? okay so β it sets the device up for 1588 support. periodt.
the first time it runs, it will create a PHC clock device. and here's the thing: it does not create a clock device if one already exists. like, it checks first, it's not messy π it also reconfigures the device after a reset, so your fave doesn't lose its whole personality every time things go sideways π
the first time a clock is created, i40e_ptp_create_clock will set pf->ptp_prev_hw_time to the current system time β°
and during resets? it is expected that this timespec will be set to the last known PTP clock time β the whole point is to preserve the clock time as close as possible across a reset. so like, keep the clock's memory intact, don't let it wake up with amnesia ππ«Ά
π SEE ALSO π
the kernel file in question, bestie:
- Kernel file
./drivers/net/ethernet/intel/i40e/i40e_ptp.c
and the whole friend group (yes, all of them, I would never leave one out π₯Ή):
i40e_ptp_extts0_work(9)i40e_is_ptp_pin_dev(9)i40e_can_set_pins(9)i40_ptp_reset_timing_events(9)i40e_ptp_verify(9)i40e_ptp_read(9)i40e_ptp_write(9)i40e_ptp_convert_to_hwtstamp(9)i40e_ptp_adjfine(9)i40e_ptp_set_1pps_signal_hw(9)i40e_ptp_adjtime(9)i40e_ptp_gettimex(9)i40e_ptp_settime(9)i40e_pps_configure(9)i40e_pin_state(9)i40e_ptp_enable_pin(9)i40e_ptp_feature_enable(9)i40e_ptp_get_rx_events(9)i40e_ptp_rx_hang(9)i40e_ptp_tx_hang(9)i40e_ptp_tx_hwtstamp(9)i40e_ptp_rx_hwtstamp(9)i40e_ptp_set_increment(9)i40e_ptp_hwtstamp_get(9)i40e_ptp_free_pins(9)i40e_ptp_set_pin_hw(9)i40e_ptp_set_led_hw(9)i40e_ptp_init_leds_hw(9)i40e_ptp_set_pins_hw(9)i40e_ptp_set_pins(9)i40e_ptp_alloc_pins(9)i40e_ptp_set_timestamp_mode(9)i40e_ptp_hwtstamp_set(9)i40e_init_pin_config(9)i40e_ptp_create_clock(9)i40e_ptp_save_hw_time(9)i40e_ptp_restore_hw_time(9)i40e_ptp_stop(9)
ngl bestie, if pf->ptp_prev_hw_time doesn't get set to the last known PTP clock time before a reset, the clock time across that reset is not gonna stay as close as possible. just saying. be a good friend to your timestamps π°οΈπ
and that's the page! sign-off time π this one's from ./drivers/net/ethernet/intel/i40e, dated October 2026 β take care of yourselves, hydrate, and remember: the clock device already exists means you don't create another one. iykyk π
β¨
π¦ 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