ethtool_nl_msg_needs_rtnl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ethtool_nl_msg_needs_rtnl(9) β€” or, the little helper that tells you if you gotta grab rtnl_lock first

okay bestie, welcome to the Kernel API Manual ✨ this one's short and sweet, and it's genuinely so useful if you're poking at ethtool Netlink stuff πŸŽ€


🌸 NAME 🌸

ethtool_nl_msg_needs_rtnl β€” literally just answers the question: does this Netlink cmd need rtnl_lock? 🫢


✨ SYNOPSIS ✨

bool ethtool_nl_msg_needs_rtnl (const struct net_device *dev , u8 cmd );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the target device πŸ’–
  • cmd β€” the ETHTOOL_MSG_* Netlink command value πŸ‘‘

πŸ”₯ RETURN πŸ”₯

It hands back true if cmd is a command for which dev has opted-in to keeping rtnl_lock held across the call (via op_needs_rtnl). No cap, that's the whole vibe check πŸ’€


🌈 SEE ALSO 🌈

  • Kernel file ./net/ethtool/common.h
  • ethtool_ioctl_needs_ntnl(9) β€” wait, no, bestie, eyes on the page πŸ‘€ it's ethtool_ioctl_needs_rtnl(9) 😭

fr fr go read common.h if you want the full picture, it's giving main character energy 🧚

okay that's the whole page, short and iconic, periodt πŸ’…

source: ./net/ethtool Β· dated October 2026 Β· mwah, hope this helped bestie πŸ“πŸ’œ

πŸ“¦ where this page comes from