STRUCT TSO_DMA_MAP(9)
π¦ struct tso_dma_map(9) π¦
okay so bestie, welcome to the Kernel API Manual β yes we're reading kernel docs together, this is our era now π
β¨ NAME β¨
struct tso_dma_map β it's literally the DMA mapping state for a GSO payload, no cap π
β¨ SYNOPSIS β¨
struct tso_dma_map {
struct device *dev;
const struct sk_buff *skb;
unsigned int hdr_len;
struct dma_iova_state iova_state;
size_t iova_offset;
size_t total_len;
int frag_idx;
unsigned int offset;
dma_addr_t linear_dma;
unsigned int linear_len;
unsigned int nr_frags;
struct {
dma_addr_t dma;
unsigned int len;
} frags[MAX_SKB_FRAGS];
};
like, that's the whole vibe right there β
πΈ Members πΈ
okay so every single field, and what it's giving:
devβ the device that's being used for the DMA mapping π«Άskbβ the GSO skb that's getting mapped, main character energy frhdr_lenβ how long each segment's header isiova_stateβ the DMA IOVA state (this one only shows up when there's an IOMMU available, iykyk)iova_offsetβ the global byte offset into the IOVA range (IOVA path only, so don't @ me if it's not around)total_lenβ the total payload length, the whole thing πfrag_idxβ which region we're on right now (-1= linear,0..nr_frags-1= frag) β she's a little index with range issues πoffsetβ the byte offset inside the current regionlinear_dmaβ the DMA address of the linear payload β¨linear_lenβ how long that linear payload isnr_fragsβ how many frags actually got DMA-mapped successfully, we love a success count πfragsβ per-frag DMA address and length, one littledma+lenpair per frag π
π₯ Description π₯
so what does it do? it DMA-maps the payload regions of a GSO skb β that's the linear data plus the frags, both of them, together π§
it prefers the DMA IOVA API, because that gives you a single contiguous mapping with just one IOTLB sync (iconic, efficient, obsessed). but if that's not happening, it falls back to per-region dma_map_phys β still slays, just one region at a time π
π SEE ALSO π
- kernel file
./include/net/tso.hβ go read it bestie struct tso_dma_map_completion_state(9)πtso_dma_map_completion_save(9)π«tso_dma_map_complete(9)β
okay that's the whole page, go be a kernel girlie now π β¨
mwah, this was ./include/net, October 2026, and the page itself? struct tso_dma_map(9) β 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