STRUCT SA_REQ(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” true if 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.c struct 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