tso_dma_map_next(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tso_dma_map_next(9)

okay so bestie, welcome to the tso_dma_map_next page β€” straight out of the Kernel API Manual, and honestly? it's a little iterator baddie. it yields the next DMA address range and we're gonna walk through it together 🫢


✨ NAME ✨

tso_dma_map_next β€” yield the next DMA address range 🌈


✨ SYNOPSIS ✨

bool tso_dma_map_next (struct tso_dma_map *map , dma_addr_t *addr ,
unsigned int *chunk_len , unsigned int *mapping_len , unsigned int
seg_remaining );

like, yes, that's a whole lot of parameters. deep breaths, we got this πŸ’œ


✨ ARGUMENTS ✨

  • map β€” the payload map πŸ—ΊοΈ the main character of this whole operation, no cap.
  • addr β€” output DMA address ✨ this is where the address gets written, it's an output bestie.
  • chunk_len β€” output chunk length πŸ“ also an output, also important.
  • mapping_len β€” full DMA mapping length when this chunk starts a new mapping region, or 0 when it's continuing a previous one. πŸŽ€ on the IOVA path this is always 0 β€” and the driver must not do per-region unmaps, okay? use tso_dma_map_cleanup instead. that's the rule, periodt.
  • seg_remaining β€” bytes left in current segment πŸ“ literally just how many bytes are chilling in the segment rn.

✨ DESCRIPTION ✨

so what it does: yields the next (dma_addr, chunk_len) pair and advances the iterator. that's the vibe πŸ’…

and on the IOVA path? the entire payload is contiguous, so each segment is always a single chunk. clean, simple, iconic ✨


✨ RETURN ✨

  • true β€” a chunk was yielded πŸ”₯ slay, we got data.
  • false β€” when seg_remaining is 0. 😭 that's it, we're done, nothing left.

✨ SEE ALSO ✨


that's the whole page bestie, go forth and iterate πŸ¦‹

sign-off time πŸŽ€ this one lives in ./net/core, dated October 2026 β€” mwah, bye! πŸ’–

πŸ“¦ where this page comes from