ENUM NET_SHAPER_SCOPE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… enum net_shaper_scope(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so this is a page straight out of the Kernel API Manual and it's literally about enum net_shaper_scope, which is the thing that tells you how to read the @id field of a shaper. that's it. that's the whole vibe. it's giving "small enum, big responsibilities" ✨


🌸 NAME 🌸

enum net_shaper_scope β€” bestie, this is the enum that defines how the shaper @id should be interpreted. no cap, that's the entire job description 🫢


✨ SYNOPSIS ✨

enum net_shaper_scope {
    NET_SHAPER_SCOPE_UNSPEC ,
    NET_SHAPER_SCOPE_NETDEV ,
    NET_SHAPER_SCOPE_QUEUE ,
    NET_SHAPER_SCOPE_NODE

};

look at her. four members, all caps, absolutely slaying in a header file somewhere πŸ’…


πŸ¦‹ CONSTANTS πŸ¦‹

  • NET_SHAPER_SCOPE_UNSPEC β€” the scope is not specified. it's the "idk, figure it out" option πŸ™ˆ
  • NET_SHAPER_SCOPE_NETDEV β€” this is the main shaper for the given network device. head shaper in charge, main character energy πŸ‘‘
  • NET_SHAPER_SCOPE_QUEUE β€” the shaper is attached to the given device queue, and the id represents the queue number. so the id is literally just "which queue bestie" πŸ“
  • NET_SHAPER_SCOPE_NODE β€” this one's the group-project icon: the shaper allows grouping of queues or other node shapers, and it can be nested in either netdev shapers or other node shapers, which means it can live in any location of the scheduling tree, except leaves and root. so close to being a free spirit 😭 not the leaves, not the root, everywhere else is fair game 🧚

🌈 SEE ALSO 🌈

  • Kernel file ./include/uapi/linux/net_shaper.h πŸ‘€
  • enum net_shaper_metric(9) β€” her sibling, go read that one too fr fr

lowkey a reminder: NET_SHAPER_SCOPE_NODE cannot be a leaf and cannot be the root. that's not a suggestion, that's the rule, bestie πŸ’€

and that's the page!! written with love from the folks at ./include/uapi/linux, dated October 2026 ⭐ mwah, go forth and shaper responsibly πŸ¦‹πŸ’–

πŸ“¦ where this page comes from