spu_skcipher_tx_sg_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay bestie, so this is from the Kernel API Manual, and the function is spu_skcipher_tx_sg_create. Let's get into it ✨

πŸ’– NAME πŸ’–

spu_skcipher_tx_sg_create β€” bestie, this literally builds up the scatterlist of buffers used to send a SPU request message for an skcipher request. It includes the SPU message headers and the request data. Periodt. πŸŽ€

🌸 SYNOPSIS 🌸

int spu_skcipher_tx_sg_create (struct brcm_message *mssg , struct
iproc_reqctx_s *rctx , u8 tx_frag_num , unsigned int chunksize , u32
pad_len );

πŸ’… ARGUMENTS πŸ’…

  • mssg β€” the mailbox message containing the transmit sg. Main character energy fr fr ✨
  • rctx β€” the crypto request context. It's giving "context is everything" πŸ’β€β™€οΈ
  • tx_frag_num β€” number of scatterlist elements required to construct the SPU request message. Basically how many pieces we're working with 🧩
  • chunksize β€” Number of bytes of request data. The literal substance, no cap πŸ’―
  • pad_len β€” Number of pad bytes. A little extra padding never hurt nobody πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

The scatterlist that gets allocated here is freed in spu_chunk_cleanup when the request completes β€” whether the request is handled successfully or there is an error. So like, it's super responsible and cleans up after itself either way. Iconic behavior honestly πŸ‘‘

πŸ”₯ RETURN πŸ”₯

  • 0 if successful
  • < 0 if an error

So basically zero means slay, negative means something went wrong 😭

🌈 SEE ALSO 🌈

Kernel file ./drivers/crypto/bcm/cipher.c


From ./drivers/crypto/bcm, October 2026. That's the whole vibe bestie, now go build those scatterlists πŸ’–πŸ«Άβœ¨

πŸ“¦ where this page comes from