STRUCT TSO_DMA_MAP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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 fr
  • hdr_len β€” how long each segment's header is
  • iova_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 region
  • linear_dma β€” the DMA address of the linear payload ✨
  • linear_len β€” how long that linear payload is
  • nr_frags β€” how many frags actually got DMA-mapped successfully, we love a success count πŸ‘‘
  • frags β€” per-frag DMA address and length, one little dma + len pair 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 🌈


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