skb_gso_transport_seglen(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… skb_gso_transport_seglen(9) β€” the Kernel API Manual, bestie edition ✨

okay so this whole page lives in the Kernel API Manual, and the star of the show is skb_gso_transport_seglen. yes it's a mouthful, no we're not changing it, it's iconic πŸŽ€


✨ NAME ✨

skb_gso_transport_seglen β€” returns the length of the individual segments of a gso packet πŸ¦‹

like literally, that's her whole job. one (1) job. and she eats every time πŸ’…


🌸 SYNOPSIS 🌸

unsigned int skb_gso_transport_seglen (const struct sk_buff *skb );

main character signature ngl β€” she takes one const struct sk_buff *skb and hands you back an unsigned int 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the GSO skb πŸ‘‘ that's it, that's the argument. one (1) skb, the GSO kind, she's not picky but she IS specific.

πŸ’– DESCRIPTION πŸ’–

okay so here's the vibe: skb_gso_transport_seglen is the one you call when you need to figure out the real size of the individual segments πŸ”₯ β€” and that includes the Layer4 headers (TCP/UDP) too. so if you were wondering "does she count the transport header," yes bestie, she counts the transport header. slay.

but β€” and this is the important part β€” the MAC/L2 headers and the network headers (IP, IPv6) are not accounted for ❌🌿. she does not know them. she does not claim them. she is not about that life.

so like, real size of the segment = L4 headers in, L2/network headers out. do not come for her about the IP header, it's simply not on her radar πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

go give these siblings some love, they're all family fr fr:


and that's the page πŸ’œ before you go: this little gem lives tucked inside ./net/core, dated October 2026 ⭐ so go forth, count your transport segment lengths, and remember β€” L2 and network headers were never invited to this party. periodt πŸ§šβ€β™€οΈπŸ’«

πŸ“¦ where this page comes from