ethtool_ioctl_needs_rtnl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay bestie, welcome to the Kernel API Manual πŸ’–. This one is ethtool_ioctl_needs_rtnl β€” does this legacy ioctl cmd need rtnl_lock? That's literally the whole question, no cap.

✨ SYNOPSIS ✨

bool ethtool_ioctl_needs_rtnl (const struct net_device *dev , u32 ethcmd
);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” target device. The device in question, the main character here.
  • ethcmd β€” ETHTOOL_* ioctl command value. The command code you're checking.

🌸 RETURN 🌸

It returns true if ethcmd is a command for which dev has opted-in to keeping rtnl_lock held across the call (via op_needs_rtnl). Yep, that's the exact condition β€” no extra lore.

πŸ‘‘ SEE ALSO πŸ‘‘

xoxo, from ./net/ethtool β€” October 2026 πŸ’…

πŸ“¦ where this page comes from