STRUCT TSO_STATE(9)
β¨ 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 iykykpacket_spaceβ how much space is remaining in the current packet β¨dma_addrβ the DMA address of the current position, iconicin_lenβ remaining length in the current SKB fragment πunmap_lenβ the length of the SKB fragmentunmap_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 headertcp_offβ offset of the TCP header πheader_lenβ number of bytes of header, that's it, that's the memberip_base_lenβ IPv4tot_lenor IPv6payload_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 π₯
- Kernel file
./drivers/net/ethernet/sfc/tx_tso.cefx_tx_queue_insert(9),tso_fill_packet_with_fragment(9),tso_start_new_packet(9),efx_enqueue_skb_tso(9)π
alright bestie that's the whole page, you ate that π
signing off with love from./drivers/net/ethernet/sfc, dated October 2026 β page namestruct tso_state(9), that's a wrap πβ¨π
π¦ 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