spu_ahash_tx_sg_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… spu_ahash_tx_sg_create β€” from your Kernel API Manual bestie

okay so this is spu_ahash_tx_sg_create(9), straight out of the Kernel API Manual, and it's lowkey the function that assembles the whole scatterlist situation for you. ✨


πŸŽ€ NAME πŸŽ€

spu_ahash_tx_sg_create β€” bestie, this builds up the scatterlist of buffers</> used to send a SPU request message for an ahash request. and yes, it includes the SPU message headers and the request data. the whole package. 😌


🌸 SYNOPSIS 🌸

int spu_ahash_tx_sg_create (struct brcm_message *mssg , struct
       iproc_reqctx_s *rctx , u8 tx_frag_num , u32 spu_hdr_len , unsigned int
       hash_carry_len , unsigned int new_data_len , u32 pad_len );

like, seven whole arguments. she's thorough. πŸ’…


✨ ARGUMENTS ✨

  • mssg β€” the mailbox message that's holding the transmit sg. it's giving delivery-girl energy πŸ“¬
  • rctx β€” the crypto request context. the vibe check for the request itself.
  • tx_frag_num β€” number of scatterlist elements required to construct the SPU request message. count 'em. πŸ”’
  • spu_hdr_len β€” length in bytes of the SPU message header. bytes, not vibes. πŸ“
  • hash_carry_len β€” Number of bytes of data carried over from previous req. leftovers but make it iconic πŸ“
  • new_data_len β€” Number of bytes of new request data. the fresh stuff ✨
  • pad_len β€” Number of pad bytes. padding is self-care πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

so the scatterlist that gets allocated here? it's freed in spu_chunk_cleanup when the request completes. and bestie, that's true whether the request is handled successfully or there is an error β€” no leaks, no drama, she cleans up after herself every single time. periodt. πŸ’–


πŸ”₯ RETURN πŸ”₯

  • 0 if successful
  • < 0 if an error

that's it, that's the whole vibe check 😭


πŸ‘‘ SEE ALSO πŸ‘‘

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

like a whole friend group. go say hi to all of them 🫢


and that's the page!! 🧚 sign-off time: this little beauty lives in the Kernel API Manual, comes from ./drivers/crypto/bcm, and is dated October 2026. mwah, go build some scatterlists bestie πŸ’œπŸŒˆβ­

πŸ“¦ where this page comes from