igb_ptp_systim_to_hwtstamp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– igb_ptp_systim_to_hwtstamp(9) πŸ’–

okay bestie, so this is the igb_ptp_systim_to_hwtstamp page from the Kernel API Manual, and it's literally gonna teach you how to turn a system time value into a hardware timestamp. slay.


✨ NAME ✨

igb_ptp_systim_to_hwtstamp β€” convert system time value to hw timestamp πŸ•°οΈ


πŸ¦‹ SYNOPSIS πŸ¦‹

void igb_ptp_systim_to_hwtstamp (struct igb_adapter *adapter , struct
       skb_shared_hwtstamps *hwtstamps , u64 systim );

πŸŽ€ ARGUMENTS πŸŽ€

  1. adapter β€” the board private structure, iykyk 🫢
  2. hwtstamps β€” the timestamp structure you're updating, no cap
  3. systim β€” an unsigned 64bit system time value. literally 64 bits of time energy ⏳

🌸 DESCRIPTION 🌸

okay so here's the vibe: we need to convert the system time value stored in the RX/TXSTMP registers into a hwtstamp β€” and that's the one the upper level timestamping functions can actually use. main character conversion arc fr fr.

the 'tmreg_lock' spinlock is used to protect the consistency of the system time value. why do we even need it? because reading the 64 bit time value involves reading two (or three) 32 bit registers, and the first read latches the value. ditto for writing. so yeah, that lock is doing the Lord's work keeping it all consistent πŸ”₯

ngl, don't skip the locking thought process β€” it's there for a real reason, bestie.

in addition, here have extended the system time with an overflow counter in software. cute little software overflow counter, iconic ✨


🌈 SEE ALSO 🌈


and that's the whole page, bestie πŸ₯Ή this gem lives in ./drivers/net/ethernet/intel/igb, it's from the Kernel API Manual, dated October 2026, and it's literally giving igb_ptp_systim_to_hwtstamp(9) energy. go off, timestamp icon πŸ‘‘πŸ’…

πŸ“¦ where this page comes from