kfifo_dma_ou...epare_mapped(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… kfifo_dma_out_prepare_mapped(9) πŸ’…

okay so bestie, this is a page straight out of the Kernel API Manual (yes, the kernel has a manual, she's iconic) and it's all about kfifo_dma_out_prepare_mapped β€” the little macro that sets you up for DMA output. pull up a chair, we're getting into it πŸŽ€


✨ NAME ✨

kfifo_dma_out_prepare_mapped β€” setup a scatterlist for DMA output πŸ¦‹


🌸 SYNOPSIS 🌸

kfifo_dma_out_prepare_mapped (fifo , sgl , nents , len , dma );

πŸ’– ARGUMENTS πŸ’–

  • fifo β€” the address of the fifo to be used, like, the actual fifo you're working with 🫢
  • sgl β€” a pointer to the scatterlist array. that's your scatterlist, bestie, point at it
  • nents β€” the number of entries in the scatterlist array. count 'em, no cap
  • len β€” the number of elements to transfer
  • dma β€” the mapped dma address to fill into sgl ⭐

πŸ”₯ DESCRIPTION πŸ”₯

so this macro fills a scatterlist for DMA output, and it'll do at most len bytes to transfer. literally that's the job πŸ’…

it returns the number of entries in the scatterlist array β€” and heads up, a zero means there is no space available and the scatterlist is not filled. so if you get a zero, don't go thinking you've got data in there, because you do not 😭

ngl the vibe here is immaculate: with only one concurrent reader and one concurrent writer, you don't need extra locking to use these macros. one reader, one writer, no drama, no locks πŸ”₯

🧚 SEE ALSO 🧚

kernel file ./include/linux/kfifo.h β€” and honestly the whole kfifo fam showed up for this one, we love a supportive ensemble πŸ‘‘


and that's the whole page, periodt πŸ’œ this lil gem lives in ./include/linux and it's dated October 2026 β€” so yeah, future energy fr fr. go forth and fill those scatterlists, bestie, you're gonna slay πŸŒˆβœ¨πŸŽ€

πŸ“¦ where this page comes from