phy_update_stats(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– phy_update_stats(9) πŸ’–

okay so real talk β€” this is a page from the Kernel API Manual, and it's about one tiny little function that goes and freshens up your PHY device's stats. yes bestie, that PHY. the ethernet one. let's get into it 🫢


✨ NAME ✨

phy_update_stats β€” update the statistics for your PHY device, but only if the driver's actually cool enough to support it πŸ’…


🌸 SYNOPSIS 🌸

int phy_update_stats (struct phy_device *phydev );

πŸŽ€ ARGUMENTS πŸŽ€

  • phydev β€” a pointer to the struct phy_device structure. like, the whole entire PHY device. she's the main character here πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe check: if the PHY driver hands over an update_stats callback, this function calls it and the stats get updated. slay. ✨

if not β€” no callback, no problem β€” it just returns 0. lowkey the most chill outcome ever, ngl.


πŸ’€ RETURN πŸ’€

  • 0 on success πŸ’š
  • or a negative error code if the callback fails 😭 (that's the callback's fault, not ours, fr fr)

πŸ”₯ SEE ALSO πŸ”₯

ngl this list is long β€” the kernel file ./drivers/net/phy/phy.c really said "let me introduce you to everyone" 😭 so here's the whole friend group, no cap, not one single name skipped:


🧚 bestie reminder: this one only does anything at all when the driver ships an update_stats callback. no callback = 0 and nothing happens. don't go looking for ghosts πŸ‘»

🌈 the cute little sign-off 🌈

this whole thing lives in ./drivers/net/phy, and it's dated October 2026 β€” so yeah, future-coded manual page, we love to see it πŸ’œ iykyk βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from