ice_phy_cfg_rx_offset_e82x(9)
π
ice_phy_cfg_rx_offset_e82x β Kernel API Manual β¨
okay so bestie, welcome to the glow-up of ice_phy_cfg_rx_offset_e82x(9), straight out of the Kernel API Manual. this one's a little PTP baddie and she's about to fix your Rx timestamps. let's get into it π
πΈ NAME πΈ
ice_phy_cfg_rx_offset_e82x β Configure total Rx timestamp offset
like, she configures the total Rx timestamp offset. that's the whole assignment. periodt π
β¨ SYNOPSIS β¨
int ice_phy_cfg_rx_offset_e82x (struct ice_hw *hw , u8 port );
that's her signature, no cap. int in, int out, two args, we been knew π«Ά
π¦ ARGUMENTS π¦
hwβ pointer to the HW struct. iconic little handle to your hardware situation πportβ the PHY port to configure. yes queen, tell her which port π
π₯ DESCRIPTION π₯
okay so the whole vibe here: you're programming the P_REG_TOTAL_RX_OFFSET register with the number of Time Units to adjust Rx timestamps by. that's the main character move. π
and the way she gets that number is lowkey a whole recipe β she combines the calculations from the Vernier offset measurements that hardware took, plus some data about the known fixed delay, plus an adjustment for multi-lane alignment delay. it's giving "three sources of truth, one register." ate. π
now the important bit, listen up bestie: this function will not return successfully until the Rx offset calculations have been completed, and completing them requires waiting until at least one packet has been received by the device. so yes, you gotta actually get a packet. no packet, no success, that's the deal π
good news though β it's safe to call this function periodically until calibration succeeds, because it will only program the offset once. so go ahead, poke at her, she's not gonna double-program. we love an idempotent queen π
β οΈ but fr fr, you must call this function only after the offset registers are valid β meaning after the Vernier calibration wait has passed β so you know the PHY has actually measured the offset. don't jump the gun on her π
and then there's the math lore, which honestly is kind of a serve: to avoid overflow, when calculating the offset based on the known static latency values, we use measurements in 1/100th of a nanosecond, and we divide the TUs per second up front. that avoids overflow while still letting the adjustment be calculated using integer arithmetic. integer arithmetic only, we're not doing floats on this blog π
return values, bestie:
- returns zero on success π
- returns
-EBUSYif the hardware vernier offset calibration has not completed π΄ - or another error code on failure, as one does π
π SEE ALSO π
first up, the source file β she lives here:
Kernel file ./drivers/net/ethernet/intel/ice/ice_ptp_hw.c
and now the entire squad. no, like, the entire squad. every single one, not a single one skipped, we don't do that here π«Ά
ice_get_ptp_src_clock_index(9), ice_ptp_read_src_incval(9),
ice_ptp_tmr_cmd_to_src_reg(9), ice_ptp_tmr_cmd_to_port_reg(9),
ice_ptp_src_cmd(9), ice_ptp_exec_tmr_cmd(9), ice_ptp_cfg_sync_delay(9),
ice_ptp_init_phc_e825c(9), ice_ptp_get_dest_dev_e825(9),
ice_write_phy_eth56g(9), ice_read_phy_eth56g(9),
ice_get_serdes_ref_sel_e825c(9), ice_phy_res_address_eth56g(9),
ice_write_port_eth56g(9), ice_read_port_eth56g(9),
ice_write_ptp_reg_eth56g(9), ice_write_mac_reg_eth56g(9),
ice_write_xpcs_reg_eth56g(9), ice_read_ptp_reg_eth56g(9),
ice_read_mac_reg_eth56g(9), ice_read_gpcs_reg_eth56g(9),
ice_read_port_mem_eth56g(9), ice_write_port_mem_eth56g(9),
ice_write_quad_ptp_reg_eth56g(9), ice_read_quad_ptp_reg_eth56g(9),
ice_is_64b_phy_reg_eth56g(9), ice_is_40b_phy_reg_eth56g(9),
ice_read_64b_phy_reg_eth56g(9), ice_read_64b_ptp_reg_eth56g(9),
ice_write_40b_phy_reg_eth56g(9), ice_write_40b_ptp_reg_eth56g(9),
ice_write_64b_phy_reg_eth56g(9), ice_write_64b_ptp_reg_eth56g(9),
ice_read_ptp_tstamp_eth56g(9), ice_clear_ptp_tstamp_eth56g(9),
ice_ptp_reset_ts_memory_eth56g(9), ice_ptp_prep_port_time_eth56g(9),
ice_ptp_prep_phy_time_eth56g(9), ice_ptp_prep_port_adj_eth56g(9),
ice_ptp_prep_phy_adj_eth56g(9), ice_ptp_prep_phy_incval_eth56g(9),
ice_ptp_read_port_capture_eth56g(9), ice_ptp_write_port_cmd_eth56g(9),
ice_phy_get_speed_eth56g(9), ice_phy_cfg_parpcs_eth56g(9),
ice_phy_cfg_ptp_1step_eth56g(9), mul_u32_u32_fx_q9(9),
add_u32_u32_fx(9), ice_ptp_calc_bitslip_eth56g(9),
ice_ptp_calc_deskew_eth56g(9), ice_phy_set_offsets_eth56g(9),
ice_phy_cfg_mac_eth56g(9), ice_phy_cfg_intr_eth56g(9),
ice_read_phy_and_phc_time_eth56g(9), ice_sync_phy_timer_eth56g(9),
ice_stop_phy_timer_eth56g(9), ice_start_phy_timer_eth56g(9),
ice_check_phy_tx_tstamp_ready_eth56g(9),
ice_ptp_read_tx_hwtstamp_status_eth56g(9),
ice_ptp_phy_soft_reset_eth56g(9), ice_get_phy_tx_tstamp_ready_eth56g(9),
ice_ptp_init_phy_e825(9), ice_fill_phy_msg_e82x(9),
ice_is_64b_phy_reg_e82x(9), ice_is_40b_phy_reg_e82x(9),
ice_read_phy_reg_e82x(9), ice_read_64b_phy_reg_e82x(9),
ice_write_phy_reg_e82x(9), ice_write_40b_phy_reg_e82x(9),
ice_write_64b_phy_reg_e82x(9), ice_fill_quad_msg_e82x(9),
ice_read_quad_reg_e82x(9), ice_write_quad_reg_e82x(9),
ice_read_phy_tstamp_e82x(9), ice_clear_phy_tstamp_e82x(9),
ice_ptp_reset_ts_memory_quad_e82x(9), ice_ptp_reset_ts_memory_e82x(9),
ice_ptp_set_vernier_wl(9), ice_ptp_init_phc_e82x(9),
ice_ptp_prep_phy_time_e82x(9), ice_ptp_prep_port_adj_e82x(9),
ice_ptp_prep_phy_adj_e82x(9), ice_ptp_prep_phy_incval_e82x(9),
ice_ptp_read_port_capture(9), ice_ptp_write_port_cmd_e82x(9),
ice_phy_get_speed_and_fec_e82x(9), ice_phy_cfg_lane_e82x(9),
ice_phy_cfg_uix_e82x(9), ice_phy_cfg_parpcs_e82x(9),
ice_calc_fixed_tx_offset_e82x(9), ice_phy_cfg_tx_offset_e82x(9),
ice_phy_calc_pmd_adj_e82x(9), ice_calc_fixed_rx_offset_e82x(9),
ice_ptp_clear_phy_offset_ready_e82x(9),
ice_read_phy_and_phc_time_e82x(9), ice_sync_phy_timer_e82x(9),
ice_stop_phy_timer_e82x(9), ice_start_phy_timer_e82x(9),
ice_get_phy_tx_tstamp_ready_e82x(9),
ice_check_phy_tx_tstamp_ready_e82x(9), ice_phy_cfg_intr_e82x(9),
ice_ptp_init_phy_e82x(9), ice_read_phy_reg_e810(9),
ice_write_phy_reg_e810(9), ice_read_phy_tstamp_ll_e810(9),
ice_read_phy_tstamp_sbq_e810(9), ice_read_phy_tstamp_e810(9),
ice_clear_phy_tstamp_e810(9), ice_ptp_init_phc_e810(9),
ice_ptp_prep_phy_time_e810(9), ice_ptp_prep_phy_adj_ll_e810(9),
ice_ptp_prep_phy_adj_e810(9), ice_ptp_prep_phy_incval_ll_e810(9),
ice_ptp_prep_phy_incval_e810(9), ice_ptp_port_cmd_e810(9),
ice_get_phy_tx_tstamp_ready_e810(9),
ice_check_phy_tx_tstamp_ready_e810(9), ice_read_sma_ctrl(9),
ice_write_sma_ctrl(9), ice_ptp_read_sdp_ac(9), ice_ptp_init_phy_e810(9),
ice_ptp_init_phc_e830(9), ice_ptp_write_direct_incval_e830(9),
ice_ptp_write_direct_phc_time_e830(9), ice_ptp_port_cmd_e830(9),
ice_read_phy_tstamp_e830(9), ice_get_phy_tx_tstamp_ready_e830(9),
ice_check_phy_tx_tstamp_ready_e830(9), ice_ptp_init_phy_e830(9),
ice_ptp_lock(9), ice_ptp_unlock(9), ice_ptp_init_hw(9),
ice_ptp_write_port_cmd(9), ice_ptp_one_port_cmd(9), ice_ptp_port_cmd(9),
ice_ptp_tmr_cmd(9), ice_ptp_init_time(9), ice_ptp_write_incval(9),
ice_ptp_write_incval_locked(9), ice_ptp_adj_clock(9),
ice_read_phy_tstamp(9), ice_clear_phy_tstamp(9), ice_get_pf_c827_idx(9),
ice_ptp_reset_ts_memory(9), ice_ptp_init_phc(9),
ice_get_phy_tx_tstamp_ready(9), ice_check_phy_tx_tstamp_ready(9),
ice_cgu_get_pin_desc_e823(9), ice_cgu_get_pin_desc(9),
ice_cgu_get_num_pins(9), ice_cgu_get_pin_type(9),
ice_cgu_get_pin_freq_supp(9), ice_cgu_get_pin_name(9),
ice_get_cgu_state(9), ice_get_cgu_rclk_pin_info(9),
ice_cgu_get_output_pin_state_caps(9)
iykyk, that's a lot of friends. she's popular π
and that's the whole page, bestie!! πβ¨ this icon lives under ./drivers/net/ethernet/intel/ice, and the manual itself is dated October 2026. ty for reading, go calibrate something, mwah π«ΆππΈ
π¦ 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