dev_get_hwtstamp_phylib(9)
π dev_get_hwtstamp_phylib β like, the whole vibe β¨
okay so real talk, bestie: this is a page from the Kernel API Manual, section 9 (the kernel-functions girlies π§), and the star of the show is dev_get_hwtstamp_phylib. Get into it.
πΈ NAME πΈ
dev_get_hwtstamp_phylib β literally the function that gets you the hardware timestamping settings of a NIC, or of a phylib PHY that's attached to it. no cap, that's the whole job π«Ά
π SYNOPSIS π
int dev_get_hwtstamp_phylib (struct net_device *dev , struct kernel_hwtstamp_config *cfg );
π¦ ARGUMENTS π¦
devβ the network device in question. your NIC, your fave, the main character π¬cfgβ the timestamping configuration structure. this is where the settings live, and it's what you're here for π
β DESCRIPTION β
It's a helper for calling the default hardware provider timestamping. that's it, that's the function. short and iconic, lowkeyπ
π NOTE π
okay so this part matters, don't skim it:
phy_mii_ioctl only handles SIOCSHWTSTAMP β not SIOCGHWTSTAMP. but plot twist: phydev->mii_ts has both hwtstamp_get and hwtstamp_set methods, so it's giving options β¨
so for phylib, this will return -EOPNOTSUPP only if hwtstamp_get is not implemented, for now. which is still more accurate than letting the netdev handle the GET request. fr fr, accuracy ate π
π₯ SEE ALSO π₯
- Kernel file
./net/core/dev_ioctl.c dev_set_hwtstamp_phylib(9)dev_load(9)dev_ioctl(9)
ngl bestie, if you're poking at timestamps and it's throwing-EOPNOTSUPPat you, check whetherhwtstamp_getis even implemented. that's the whole tea β
and that's the page!! π courtesy of the kernel file ./net/core, dated October 2026 β ily, go timestamp something πππ
π¦ 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