dev_set_hwtstamp_phylib(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

dev_set_hwtstamp_phylib β€” okay so this is the one that changes the hardware timestamping of a NIC, or of an attached phylib PHY. Like, it flips the timestamping situation. πŸ’…


✨ SYNOPSIS ✨

int dev_set_hwtstamp_phylib (struct net_device *dev , struct
kernel_hwtstamp_config *cfg , struct netlink_ext_ack *extack );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the network device. bestie. the NIC in question. πŸ–₯️
  • cfg β€” the timestamping configuration structure. this is where the actual settings live, okurrr πŸ’–
  • extack β€” the Netlink extended ack message structure, and it's literally there for error reporting. so if stuff goes sideways, this is where the tea gets spilled 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

So this is a helper function, and its whole job is enforcing a common policy. And the policy is giving very much main character energy:

phylib timestamping, if it's available, should take precedence in front of hardware timestamping provided by the netdev. periodt. PHY wins the vibe check, and the netdev-provided hardware timestamping is behind it in line. πŸ‘‘

But okay, here's the part you actually need to know, because it's lowkey important: if the netdev driver needs to do specific actions even for PHY timestamping to work properly β€” and the example is literally a switch port must trap the timestamped frames and not forward them β€” then it must set dev->see_all_hwtstamp_requests. no cap, that's the flag, that's the move. set it or your switch port is out here forwarding frames it should've trapped and the timestamping situation is giving chaos πŸ™ˆ

fr fr, don't skip the dev->see_all_hwtstamp_requests part. the driver has specific actions to perform? set it. it's not optional, it's the whole point 🫢

🧚 SEE ALSO 🧚


and that's the whole page bestie, you ate that πŸ’… this one's from ./net/core, dated October 2026, and it lives in the Kernel API Manual like the little legend it is. go forth and timestamp correctly πŸŒˆπŸŽ€βœ¨

πŸ“¦ where this page comes from