virtsnd_pcm_sg_from(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ virtsnd_pcm_sg_from(9) β€” Kernel API Manual ✨

okay bestie, welcome to the virtsnd_pcm_sg_from page, part of the Kernel API Manual πŸŽ€ she's a little function with a big job and honestly? she ate.


πŸ’– NAME πŸ’–

virtsnd_pcm_sg_from β€” build an sg-list from a vmalloc'ed buffer. that's it, that's the whole vibe ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

void virtsnd_pcm_sg_from (struct scatterlist *sgs , int nsgs , u8 *data
, unsigned int length );

like, look at her. five lines. effortless. πŸ’…


🌸 ARGUMENTS 🌸

  • sgs β€” the preallocated sg-list you're gonna populate. it's already there, you're just filling it in, no cap 🫢
  • nsgs β€” the maximum number of elements in the sgs. respect the cap, bestie, it's literally the cap πŸ™ˆ
  • data β€” pointer to a vmalloc'ed buffer. vmalloc'ed, okay? don't come at her with anything else πŸ’€
  • length β€” buffer size. the size. of the buffer. iconic of her honestly 🌈

πŸ”₯ DESCRIPTION πŸ”₯

so what she does is: she splits the buffer into physically contiguous parts, and then she makes an sg-list out of those parts.

it's giving organizer energy β€” one big messy buffer goes in, one tidy sg-list comes out, and she doesn't even break a sweat πŸ’…βœ¨


⭐ CONTEXT ⭐

Any context. literally any. she's flexible like that 🧚


πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./sound/virtio/virtio_pcm_msg.c, plus the whole friend group:

go read them all, iykyk πŸ“


ok that's the page!! mwah πŸ’œ

and before you go β€” this lil beauty lives in ./sound/virtio, dated October 2026, and yes she's virtsnd_pcm_sg_from(9) all over again at the bottom because she's consistent like that πŸ˜­πŸŽ€ bye bestie, slay your sg-lists 🌸

πŸ“¦ where this page comes from