crypto_alloc_acomp_node(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the cra_name / name or the cra_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_ERR is true, and PTR_ERR returns 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

(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