qi_cache_alloc(9)
π 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 equivalentmalloc(..)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 π
- Kernel file
./drivers/crypto/caam/qi.h caam_drv_ctx_init(9)caam_qi_enqueue(9)caam_drv_ctx_busy(9)caam_drv_ctx_update(9)caam_drv_ctx_rel(9)qi_cache_free(9)
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
- 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