STRUCT ICE_TX_TSTAMP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ice_tx_tstamp(9) πŸ’…

okay bestie, welcome to the Kernel API Manual β€” today's main character is struct ice_tx_tstamp, and she's literally just here to keep track of a single Tx timestamp request. no cap. ✨


🌸 NAME 🌸

struct ice_tx_tstamp β€” Tracking for a single Tx timestamp πŸ•


πŸ¦‹ SYNOPSIS πŸ¦‹

struct ice_tx_tstamp {
    struct sk_buff *skb;
    unsigned long start;
    u64 cached_tstamp;
 };

πŸŽ€ MEMBERS πŸŽ€

  • skb β€” pointer to the SKB for this timestamp request 🫢 (this is the one you hand over when you kick off a request)
  • start β€” jiffies when the timestamp was first requested ⏱️
  • cached_tstamp β€” last read timestamp πŸ’Ύ like, the timestamp you read most recently, saved for later

✨ DESCRIPTION ✨

So this structure tracks a single timestamp request β€” that's her whole job, and she ate. πŸ’… The SKB pointer is provided when initiating a request.

The start time is used to ensure that we discard old requests that were not fulfilled within a 2 second time window. πŸ‘‹ bye stale requests, you had your 2 seconds, no hard feelings.

Timestamp values in the PHY are read only and do not get cleared except at hardware reset or when a new timestamp value is captured. like, they're not doing the whole "reset after you read me" thing β€” rude but fine. 🫠

Some PHY types do not provide a "ready" bitmap indicating which timestamp indexes are valid. 😭 In these cases, we use a cached_tstamp to keep track of the last timestamp we read for a given index. If the current timestamp value is the same as the cached value, we assume a new timestamp hasn't been captured. This avoids reporting stale timestamps to the stack. and that's the whole point β€” no stale data on our watch, periodt. πŸ”₯

ngl this check only happens if the has_ready_bitmap flag is not set in ice_ptp_tx structure. no flag, no bitmap, cached value does the vibe check instead. 🧚

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/net/ethernet/intel/ice/ice_ptp.h enum ice_tx_tstamp_work(9)
  • struct ice_ptp_tx(9)
  • struct ice_ptp_port(9)
  • struct ice_ptp_pin_desc(9)
  • struct ice_ptp(9)

all the girlies in the same friend group, iykyk πŸ’œ


and that's the page!! 🌈 shoutout to ./drivers/net/ethernet/intel/ice and the October 2026 date stamp β€” this one's from the Kernel API Manual, mwah πŸ’‹ πŸŽ€

πŸ“¦ where this page comes from