spu_ahash_rx_sg_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… spu_ahash_rx_sg_create(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so real talk, this is a page from the Kernel API Manual (spu_ahash_rx_sg_create(9), section 9, kernel-flavoured) and it's literally about building the scatterlist that catches SPU response messages for an ahash request. it's giving ✨plumbing✨ but honestly? iconic plumbing.


🌸 NAME 🌸

spu_ahash_rx_sg_create β€” bestie, this is the function that builds up the scatterlist of buffers used to receive a SPU response message for an ahash request. that's it, that's the whole gig. 🫢


⭐ SYNOPSIS ⭐

int spu_ahash_rx_sg_create (struct brcm_message *mssg , struct
       iproc_reqctx_s *rctx , u8 rx_frag_num , unsigned int digestsize , u32
       stat_pad_len );

like, yes, it returns an int. we love a return type that tells you how it's feeling. 😌


πŸ¦‹ ARGUMENTS πŸ¦‹

  • mssg β€” the mailbox message that's carrying the receive sg. it's the ride, the sg is the passenger. πŸš—
  • rctx β€” the crypto request context. the emotional support struct of this whole operation.
  • rx_frag_num β€” how many scatterlist elements you need to hold the SPU response message. count 'em, bestie, u8 says there's only so many. πŸ”’
  • digestsize β€” length of the hash digest, in bytes. (unsigned int, no games.)
  • stat_pad_len β€” number of bytes required to pad the STAT field to a 4-byte boundary. yes this is a real job that someone has to do. alignment queen behavior. πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so here's the tea β˜•: the scatterlist that gets allocated here is freed in spu_chunk_cleanup when the request completes β€” and the way that it does not care whether the request was handled successfully or there was an error is honestly so brave of it. success or flop, spu_chunk_cleanup cleans up. no cap. 🧹✨


πŸ”₯ RETURN πŸ”₯

  • 0 if successful 🌈
  • < 0 if an error πŸ’€

that's the whole vibe check. negative means bad news.


πŸ‘‘ SEE ALSO πŸ‘‘

literally the entire friend group, in the order the page lists them β€” don't make me tap the sign:

kernel file ./drivers/crypto/bcm/cipher.c plus select_channel(9), spu_skcipher_rx_sg_create(9), spu_skcipher_tx_sg_create(9), handle_skcipher_req(9), handle_skcipher_resp(9), spu_ahash_tx_sg_create(9), handle_ahash_req(9), spu_hmac_outer_hash(9), ahash_req_done(9), handle_ahash_resp(9), spu_aead_rx_sg_create(9), spu_aead_tx_sg_create(9), handle_aead_req(9), handle_aead_resp(9), spu_chunk_cleanup(9), finish_req(9), spu_rx_callback(9), skcipher_enqueue(9), spu_no_incr_hash(9), aead_gcm_esp_setkey(9), rfc4543_gcm_esp_setkey(9), aead_ccm_esp_setkey(9), spu_functions_register(9), spu_mb_init(9).


and that's the page, bestie!! πŸ§šπŸ’œ this little beauty lives in ./drivers/crypto/bcm, and the version vibes are dated October 2026 β€” so go forth, build your rx scatterlist, and remember: it always gets freed in spu_chunk_cleanup. mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from