qi_cache_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… qi_cache_alloc(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ β€” this one's about qi_cache_alloc, and honestly? she's a little workhorse and we're obsessed 🫢


🌸 NAME 🌸

qi_cache_alloc β€” grab yourself some buffers from the CAAM-QI cache, no cap πŸŽ€


✨ SYNOPSIS ✨

void * qi_cache_alloc (gfp_t flags );

like, that's the whole signature. short and iconic πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • flags β€” these are the flags you'd pass to the equivalent malloc(..) call. yeah, literally that. same energy, different allocator πŸ’«

πŸ’– DESCRIPTION πŸ’–

so here's the vibe check: you call this when a user of the CAAM-QI (that's caamalg-qi, iykyk) needs data allocated on the hotpath πŸ”₯. and instead of reaching for malloc, you can use the services of the CAAM QI memory cache β€” which is backed by kmem_cache, fancy ✨.

the buffers come out at a size of 256B, which is genuinely enough room to host 16 SG entries πŸŽ€. like, she's small but she's sufficient, periodt.

returns a pointer to a retrieved buffer on success πŸ’œ β€” or NULL on failure 😭 (yes, check it, bestie, please)

🌈 SEE ALSO 🌈


and that's the whole page, bestie πŸ§šπŸ’œ this little gem lives in ./drivers/crypto/caam and it's dated October 2026 β€” those are the exact source/version + date deets, so don't come for me πŸ’… slay, go allocate responsibly 🌟

πŸ“¦ where this page comes from