__skb_gso_segment(9)
π __skb_gso_segment(9) π
okay bestie, welcome to the Kernel API Manual β¨ this one is short but it's giving load-bearing and you're gonna want to actually read it, fr fr π«Ά
πΈ NAME πΈ
__skb_gso_segment β perform segmentation on skb π
β¨ SYNOPSIS β¨
struct sk_buff * __skb_gso_segment (struct sk_buff *skb ,
netdev_features_t features , bool tx_path );
like, that's the whole vibe. three args, one return, no cap π
π¦ ARGUMENTS π¦
skbβ the buffer you want to segment π this is the main character, literallyfeaturesβ the features for the output path (seedev->features). yes, that's where you look, iykyk β¨tx_pathβ whether it is called in TX path π so like, are we in the TX path or not, that's the question
π DESCRIPTION π
so basically this function segments the given skb and returns a list of segments. slay. π that's it, that's the job.
okay but here's the part you cannot skip π it may return NULL if the skb requires no segmentation. and like β that's only possible when GSO is used for verifying header integrity. so if you see NULL waltzing back at you, don't panic, that's allowed, that's the contract, periodt π
also important and very easy to miss ngl: segmentation preserves SKB_GSO_CB_OFFSET bytes of previous skb cb. SKB_GSO_CB_OFFSET β that exact macro, that exact number of bytes, don't be out here guessing π
β οΈ warning bestie: keepSKB_GSO_CB_OFFSETand thecbpreservation in mind before you go touching our belovedskb->cbβ the semantics here are load-bearing and the kernel is not forgiving π
π₯ SEE ALSO π₯
kernel file ./net/core/gso.c + all her iconic friends π
skb_eth_gso_segment(9)skb_mac_gso_segment(9)skb_gso_transport_seglen(9)skb_gso_network_seglen(9)skb_gso_mac_seglen(9)skb_gso_size_check(9)skb_gso_validate_network_len(9)skb_gso_validate_mac_len(9)
go read them, they ate π
π«Ά and that's the page! huge thanks to the fine people over in ./net/core who shipped this one, dated October 2026 π mwah, go segment something responsibly bestie πΈβ¨
π¦ 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