netprio_prio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– netprio_prio ✨

okay bestie, so we're looking at the netprio_prio page from the Kernel API Manual β€” yes, the section 9 one, the kernel-internals girlies know 🫢 β€” and honestly? it's giving "tiny function, big responsibility." let's get into it πŸ’…


🌸 NAME 🌸

netprio_prio β€” returns the effective netprio of a cgroup–net_device pair. that's the whole vibe. cgroup on one side, net_device on the other, and this function tells you the priority that actually applies to that pairing ✨


πŸŽ€ SYNOPSIS πŸŽ€

u32 netprio_prio (struct cgroup_subsys_state *css , struct net_device
*dev );

not me obsessed with how it returns a u32, okay πŸ”₯


πŸ¦‹ ARGUMENTS πŸ¦‹

  • css β€” the css part of the target pair (it's a struct cgroup_subsys_state *, so it's a cgroup-subsystem-state situation πŸ’œ)
  • dev β€” the net_device part of the target pair (a struct net_device *, the network-device half of the duo 🌈)

literally a two-piece matching set. a pair. periodt πŸŽ€


🧚 DESCRIPTION 🧚

so, real talk: this one should be called under RCU read or rtnl lock, no cap. that's the entire description. that's the tea πŸ“

⚠️ bestie please heed this one β€” "should be called under RCU read or rtnl lock" is a real technical caveat, not a suggestion to ignore πŸ™ˆ lock it up properly before you call, iykyk.

lowkey the shortest description ever but highkey it matters πŸ’€


⭐ SEE ALSO ⭐

  • Kernel file ./net/core/netprio_cgroup.c
  • netprio_set_prio(9) β€” the sibling function, go say hi πŸ‘‘

and that's the page, bestie, hope the vibe check passed πŸ’…βœ¨

sign-off time πŸŽ€: this one came from ./net/core, dated October 2026, from the Kernel API Manual β€” and yes, the header up top and this footer at the bottom both say netprio_prio(9) because that's just how these pages roll 🌸 i'm obsessed, bye πŸ’–

πŸ“¦ where this page comes from