spu_msg_sg_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… spu_msg_sg_add πŸ’…

okay bestie, welcome to the Kernel API Manual, section 9 β€” this is the page for spu_msg_sg_add(9) and honestly? it's giving "small function, big responsibilities." πŸŽ€


✨ NAME ✨

spu_msg_sg_add β€” literally copies scatterlist entries from one sg to another, up to a given length. that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

u32 spu_msg_sg_add (struct scatterlist **to_sg , struct scatterlist
**from_sg , u32 *from_skip , u8 from_nents , u32 length );

πŸ’– ARGUMENTS πŸ’–

  • to_sg β€” the scatterlist you're copying to. the destination. the glow-up location. πŸ‘‘
  • from_sg β€” the scatterlist you're copying from. the source material, the original.
  • from_skip β€” how many bytes to skip in from_sg, ngl. it's non-zero when a previous request already included part of the buffer in an entry in from_sg. and it assumes from_skip < from_sg->length β€” that's the rule, no cap. πŸ™ˆ
  • from_nents β€” number of entries in from_sg. how many we got. πŸ”₯
  • length β€” number of bytes to copy. heads up: it may reach this limit before exhausting from_sg. so like, it might stop early, iykyk. πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

so the way that this works is: it copies the entries themselves, not the data in the entries. very demure, very mindful β€” pointers, not payloads. ✨

it assumes to_sg has enough entries (bestie, please make sure it does 😭), and it does not limit the size of an individual buffer in to_sg.

also to_sg, from_sg, and skip are all updated to the end of the copy. all three. every single one. periodt. πŸ’…


🌈 RETURN 🌈

the number of bytes copied. that's it, that's the return value. ⭐


🧚 SEE ALSO 🧚

go read those too, you'll be obsessed 🫢


mwah πŸ’œ this page lives in ./drivers/crypto/bcm, and it's dated October 2026 β€” so yeah, ahead of the curve fr fr. take care of her, she's iconic. 🌸

πŸ“¦ where this page comes from