netprio_set_prio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… netprio_set_prio(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for netprio_set_prio(9) β€” yes the manual name is literally baked into the title, that's just how kernel docs roll, iykyk 🫢


✨ NAME ✨

netprio_set_prio β€” set netprio on a cgroup-net_device pair πŸŽ€

like, you've got a cgroup and you've got a net_device, and this function is the matchmaker that sets the netprio on the pair of them. slay.


🌸 SYNOPSIS 🌸

int netprio_set_prio (struct cgroup_subsys_state *css , struct
       net_device *dev , u32 prio );

three args, returns an int, that's the whole vibe πŸ”₯


πŸ¦‹ ARGUMENTS πŸ¦‹

  • css β€” the css part of the target pair, bestie πŸ’–
  • dev β€” the net_device part of the target pair 🌈
  • prio β€” the prio to set, periodt ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

Set netprio to prio on the css-dev pair. simple as that πŸ’…

⚠️ okay but fr fr listen to this part: it should be called under rtnl lock, and it may fail under memory pressure for non-zero prio. so like, don't just call it wherever, and don't be shocked if a non-zero prio ghosts you when memory is struggling 😭 not its fault, it's just the vibes.

πŸ’€ SEE ALSO πŸ’€


and that's the tea πŸ“ this page lives under ./net/core, dated October 2026 β€” mwah, go forth and set those priorities, main character energy only πŸ§šπŸ’œ

πŸ“¦ where this page comes from