tso_dma_map_next(9)
π 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, or0when it's continuing a previous one. π on the IOVA path this is always0β and the driver must not do per-region unmaps, okay? usetso_dma_map_cleanupinstead. 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β whenseg_remainingis0. π that's it, we're done, nothing left.
β¨ SEE ALSO β¨
- Kernel file
./net/core/tso.c tso_dma_map_init(9)tso_dma_map_cleanup(9)tso_dma_map_count(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms