STRUCT SA_REQ(9)
π struct sa_req(9) β like, the whole SA request definition, bestie
okay so this is struct sa_req(9) from the Kernel API Manual, and it's literally the blueprint for an SA request. think of it as the main character struct that carries everything the crypto engine needs to know about one single request. no cap, every field matters.
β¨ SYNOPSIS β¨
here's the whole glow-up, verbatim, don't touch a character:
struct sa_req {
struct device *dev;
u16 size;
u8 enc_offset;
u16 enc_size;
u8 *enc_iv;
u8 auth_offset;
u16 auth_size;
u8 *auth_iv;
u32 type;
u32 *cmdl;
struct crypto_async_request *base;
struct sa_tfm_ctx *ctx;
bool enc;
struct scatterlist *src;
struct scatterlist *dst;
dma_async_tx_callback callback;
u16 mdata_size;
};
(yeah there's a lil space before that closing brace, she's quirky like that π )
π Members π
okay bestie, field-by-field tour, buckle up π¦
devβ the device for the request. like, which hardware baddie is doing the work.sizeβ total data to the xmitted via DMA. (yes, "xmitted", the original said it like that, we respect the lore π)enc_offsetβ offset of cipher data. where the cipher bits start.enc_sizeβ the data to be passed to cipher engine.enc_ivβ cipher IV. the initialization vector for the cipher, iconic.auth_offsetβ offset of the authentication data.auth_sizeβ size of the authentication data.auth_ivβ authentication IV.typeβ algorithm type for the request. which algorithm vibe we're on.cmdlβ command label pointer.baseβ pointer to the base request.ctxβ pointer to the algorithm context data.encβtrueif this is an encode request.bool, so like, yes/no, pick one π«Άsrcβ source data.dstβ destination data.callbackβ DMA callback for the request.mdata_sizeβ metadata size passed to DMA.
π SEE ALSO π
go touch some grass in the kernel tree, these are the friends:
- Kernel file
./drivers/crypto/sa2ul.cstruct sa_cmdl_cfg(9),struct algo_data(9),struct sa_alg_tmpl(9),struct sa_mapped_sg(9),struct sa_rx_data(9)
lowkey a reminder: this page is your map, but the notes above are just describing what each member is β the source is the source, iykyk π
and that's the whole page, bestie!! shoutout to ./drivers/crypto for holding it down, and it's dated October 2026 so she's fresh off the press β¨π stay hydrated, read your structs, periodt π
π¦ 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