STRUCT TSO_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct tso_state(9) ✨

okay so bestie, welcome to the struct tso_state page from the Kernel API Manual β€” yes, that's the manual name, we're doing this πŸ’…


πŸŽ€ NAME πŸŽ€

struct tso_state β€” the TSO state for an SKB, no cap ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

struct tso_state {
    unsigned int out_len;
    unsigned int seqnum;
    u16 ipv4_id;
    unsigned int packet_space;
    dma_addr_t dma_addr;
    unsigned int in_len;
    unsigned int unmap_len;
    dma_addr_t unmap_addr;
    __be16 protocol;
    unsigned int ip_off;
    unsigned int tcp_off;
    unsigned int header_len;
    unsigned int ip_base_len;
    dma_addr_t header_dma_addr;
    unsigned int header_unmap_len;
};

look at that struct. fifteen whole members. she's built different πŸ‘‘


🌸 Members 🌸

okay the main character energy is OFF the charts here, let's meet the cast 🫢

  • out_len β€” how much length is still left in the current segment, literally.
  • seqnum β€” the current sequence number, bestie. that one. πŸŽ€
  • ipv4_id β€” the current IPv4 ID, and it's in host endian β€” remember that, it matters iykyk
  • packet_space β€” how much space is remaining in the current packet ✨
  • dma_addr β€” the DMA address of the current position, iconic
  • in_len β€” remaining length in the current SKB fragment πŸ’–
  • unmap_len β€” the length of the SKB fragment
  • unmap_addr β€” the DMA address of the SKB fragment πŸ¦‹
  • protocol β€” the network protocol, and this is after any VLAN header β€” very important, don't forget πŸ’€
  • ip_off β€” offset of the IP header
  • tcp_off β€” offset of the TCP header 🌈
  • header_len β€” number of bytes of header, that's it, that's the member
  • ip_base_len β€” IPv4 tot_len or IPv6 payload_len, measured before the TCP payload πŸ‘‘
  • header_dma_addr β€” the header DMA address ✨
  • header_unmap_len β€” the header DMA mapped length πŸ’…

🧚 Description 🧚

so this is the state used during segmentation. periodt.

and the reason it's all bundled into this one data structure? lowkey just to make it easy to pass into inline functions. that's the whole vibe. no lore, no drama, just ergonomics 🫢


πŸ”₯ SEE ALSO πŸ”₯


alright bestie that's the whole page, you ate that πŸ“

signing off with love from ./drivers/net/ethernet/sfc, dated October 2026 β€” page name struct tso_state(9), that's a wrap πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from