netprio_set_prio(9)
π 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β thenet_devicepart 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 π
- Kernel file
./net/core/netprio_cgroup.c netprio_prio(9)
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
- 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