qman_create_cgr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… qman_create_cgr β€” the Kernel API Manual, bestie edition (section 9, obviously)

okay so picture this: you're deep in the Linux kernel API manual, section 9, and you've stumbled onto qman_create_cgr(9) β€” yes that's the real name, that's the page, we're doing this πŸŽ€


✨ NAME ✨

qman_create_cgr β€” literally just register a congestion group object. that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

int qman_create_cgr (struct qman_cgr *cgr , u32 flags , struct
qm_mcc_initcgr *opts );

she takes three things and returns an int, periodt πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • cgr β€” the 'cgr' object itself, with its fields already filled in. like, you gotta bring your own homework here, she's not doing it for you πŸ“
  • flags β€” the QMAN_CGR_FLAG_* values. pick your flags, bestie ✨
  • opts β€” optional state of CGR settings. optional!! key word πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

So what does she actually do? She registers this object for receiving congestion entry/exit callbacks β€” and the way she does it is on the portal affine to the cpu portal on which this API is executed. iykyk πŸ‘‘

If opts is NULL then only the callback (cgr->cb) function is registered. that's it. that's the whole registration. lowkey minimal 🫢

But if flags contains QMAN_CGR_FLAG_USE_INIT, then an init hw command will be used rather than a modify hw hardware. and yes, the init hw command will reset any unspecified parameters β€” so if you weren't paying attention to the ones you left out, they're getting reset, no cap 😭 (the modify hw hardware, for the record, only modifies the specified parameters β€” much more chill about it).

fr fr read that flag twice before you set it. resetting unspecified parameters is exactly as much of a moment as it sounds πŸ’€

🌈 SEE ALSO 🌈

like, the whole friend group showed up to this party πŸ§šπŸ’œ


and that's the page!! mwah πŸ’‹ sign-off time: this one lives in ./include/soc/fsl, dated October 2026, and it answers to qman_create_cgr(9) β€” go forth and register responsibly, bestie πŸ“β­

πŸ“¦ where this page comes from