ethtool_nl_msg_needs_rtnl(9)
π
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β theETHTOOL_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'sethtool_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
- 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