rdma_umem_fo...ch_dma_block(9)
β¨ rdma_umem_for_each_dma_block β¨
okay so this is a page from the Kernel API Manual (yes, the serious kernel docs, but we're making it cute) β it's literally a macro that walks you through memory. Let's get into it bestie π
πΈ NAME πΈ
rdma_umem_for_each_dma_block β iterate over contiguous DMA blocks of the umem
π SYNOPSIS π
rdma_umem_for_each_dma_block (umem , biter , pgsz );
π¦ ARGUMENTS π¦
umemβ the umem you're iterating over, bestie β¨biterβ-- undescribed --π (yeah the original page literally says that, no cap, i'm not making it up)pgszβ the page size you wanna split the list into π
π DESCRIPTION π
pgsz must be <= PAGE_SIZE or computed by ib_umem_find_best_pgsz β that's a hard requirement, not a suggestion, okay? π
The returned DMA blocks are gonna be aligned to pgsz and they span this range:
ALIGN_DOWN(umem->address, pgsz) to ALIGN(umem->address + umem->length, pgsz)
It performs exactly ib_umem_num_dma_blocks iterations. Exactly. Not one more, not one less. periodt π
π₯ SEE ALSO π₯
- Kernel file
./include/rdma/iter.h rdma_block_iter_dma_address(9)rdma_for_each_block(9)
ok and that's the whole vibe β go read ./include/rdma/iter.h if you wanna see the real thing, iykyk π§
mwah π this page lives in the kernel source tree at ./include/rdma, dated October 2026, and yes the header up top literally shows the manual name twice because that's just how these pages do it. slay π
π¦ 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