ethtool_lin...st_link_mode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the Kernel API Manual, and today's main character is a tiny little helper from ethtool land that just peeks at one single bit and tells you if it's lit or not. no cap, that's the whole vibe. it's giving "small but mighty" πŸŽ€


🌸 NAME 🌸

ethtool_link_ksettings_test_link_mode β€” test a bit in the ksettings link mode mask πŸ¦‹


✨ SYNOPSIS ✨

ethtool_link_ksettings_test_link_mode (ptr , name , mode );

πŸ’– ARGUMENTS πŸ’–

  • ptr β€” a pointer to struct ethtool_link_ksettings, like, the ksettings thing itself. hand it over and it'll go look inside 🫢
  • name β€” which mask we're digging around in, and it's one of supported / advertising / lp_advertising. pick your fighter πŸ’…
  • mode β€” one of the ETHTOOL_LINK_MODE_*_BIT values. and listen 🚨 this one is not atomic and there's no bound checking, so nobody's holding your hand here, bestie β€” you gotta know your indices are valid, fr fr πŸ’€

🌈 RETURN 🌈

true / false β€” literally just "yep that bit's set" or "nope, it's not." binary queen behavior πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

kernel file ./include/linux/ethtool.h β€” and omg the friend group is HUGE, look at all of them:


like, that's the whole roster β€” every single one of them, no gatekeeping πŸ’œ

and that's the page!! short, sweet, and lowkey iconic. this came out of the ./include/linux corner of the kernel and it's dated October 2026 β€” so go check your link mode bits, bestie, and slay βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’–

πŸ“¦ where this page comes from