crypto_alloc_acomp_node(9)
π crypto_alloc_acomp_node(9) β or, how to grab an async-compress handle pinned to the NUMA node of your dreams
okay so bestie, welcome to the Kernel API Manual page for crypto_alloc_acomp_node(9). this one's short but she's important π«Ά
β¨ NAME β¨
crypto_alloc_acomp_node β allocate an ACOMPRESS tfm handle with the desired NUMA node π
πΈ SYNOPSIS πΈ
struct crypto_acomp * crypto_alloc_acomp_node (const char *alg_name ,
u32 type , u32 mask , int node );
that's it, that's the whole vibe. four args, one handle, zero drama (mostly) β¨
π¦ ARGUMENTS π¦
alg_nameβ this is thecra_name/ name or thecra_driver_name/ driver name of the compression algorithm. like, for example,"deflate". you're basically telling the kernel which compressor you want, by name, iconic behavior ngl πtypeβ specifies the type of the algorithm. lowkey the who-are-you field.maskβ specifies the mask for the algorithm. the how-picky-are-you field πnodeβ specifies the NUMA node the ZIP hardware belongs to. so you want your hardware accelerator on a specific node? this is where you say that. fr fr π§
π DESCRIPTION π
so what does she do. she allocates a handle for a compression algorithm. that's the whole thing. main character energy π₯
drivers should try to use (de)compressors on the specified NUMA node β like, that's the entire point of the _node suffix, no cap.
the returned struct crypto_acomp is the handle that is required for any subsequent API invocation for the compression operations. translation: you cannot skip this step. this handle is your golden ticket π everything else you do with compression later needs her.
no handle, no compression. the way that works is honestly so real of the kernel π
π RETURN π
- success β you get the allocated handle. slay, congrats, go compress something π
- error β
IS_ERRis true, andPTR_ERRreturns the error code. so check it, bestie, please, do not just raw-dog the return value π
π₯ SEE ALSO π₯
buckle up, this list is long, girlie is connected π
Kernel file ./include/crypto/acompress.h
struct acomp_req(9)struct crypto_acomp(9)Asynchronous Compression API(9)crypto_alloc_acomp(9)crypto_free_acomp(9)acomp_request_alloc_extra(9)acomp_request_alloc_extra(9)acomp_request_free(9)acomp_request_set_callback(9)acomp_request_set_params(9)acomp_request_set_src_sg(9)acomp_request_set_src_dma(9)acomp_request_set_src_nondma(9)acomp_request_set_src_folio(9)acomp_request_set_dst_sg(9)acomp_request_set_dst_dma(9)acomp_request_set_dst_nondma(9)acomp_request_set_dst_folio(9)crypto_acomp_compress(9)crypto_acomp_decompress(9)
(and yes, acomp_request_alloc_extra(9) is listed twice in the original and we are not touching it β she said what she said β¨)
okay that's the whole page, you ate that π this gem comes from the source path ./include/crypto, dated October 2026, and she's filed under the Kernel API Manual β mwah, go forth and 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