ixgbe_ptp_c..._to_hwtstamp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ixgbe_ptp_convert_to_hwtstamp ✨

okay so bestie, welcome to the Kernel API Manual πŸ’… this little cutie is called ixgbe_ptp_convert_to_hwtstamp, and yes the header up top shortens it to ixgbe_ptp_c..._to_hwtstamp(9) because man page headers are dramatic like that. anyway. sit down, we're learning about hardware timestamps πŸ•°οΈ


🌸 NAME 🌸

ixgbe_ptp_convert_to_hwtstamp β€” literally just converts a register value into a hw timestamp. that's the whole job. she's an icon, she's a legend, she's a one-task queen πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

void ixgbe_ptp_convert_to_hwtstamp (struct ixgbe_adapter *adapter ,
struct skb_shared_hwtstamps *hwtstamp , u64 timestamp );

no return value, she just does her thing and leaves πŸ’«


πŸ¦‹ ARGUMENTS πŸ¦‹

  • adapter β€” the private adapter structure, aka her personal stash of hardware secrets πŸ™ˆ
  • hwtstamp β€” the stack timestamp structure, where the shiny new value ends up 🎁
  • timestamp β€” an unsigned 64bit system time value, so like. a big number. a very big number. 64 bits of pure potential ✨

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the vibe: we need to convert the adapter's RX/TXSTMP registers into a hwtstamp value that the stack's ptp functions can actually use. it's giving translator. it's giving "I speak both hardware and software" main character energy 🌈

the lock is used to protect consistency of the cyclecounter and the SYSTIME registers. but β€” and this is the important part, ngl β€” it does not need to protect against the Rx or Tx timestamp registers, because there can't be a new timestamp until the old one is unlatched by reading. so the lock is doing its little job over here, not over there. boundaries, bestie 🫢

in addition to the timestamp in hardware, some controllers need a software overflow cyclecounter, and this function takes that into account as well. thoughtful queen. she remembered the edge case so you don't have to πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group πŸ«‚ starting with the kernel file itself:

  • Kernel file ./drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c

and then, in order, because we do not disrespect the list:


friendly reminder that the manual name is ixgbe_ptp_c..._to_hwtstamp(9) and this is the Kernel API Manual β€” so if you're quoting her at a party, quote her correctly πŸ’–

and that's the whole page, bestie!! πŸŽ€ source path is ./drivers/net/ethernet/intel/i... (truncated by the man page herself, not me), version-slash-date situation is October 2026, and the footer name is ixgbe_ptp_c..._to_hwtstamp(9) β€” so this diva has been documented in the future, which honestly tracks. slay. periodt. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from