skb_segment(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– skb_segment(9) β€” a Kernel API Manual moment πŸ’–

okay so bestie, welcome to the glow-up of skb_segment, brought to you by the Kernel API Manual. it's not deep lore, it's just the function for doing protocol segmentation on an skb, and honestly? she's iconic. let's get into it ✨


🌸 NAME 🌸

skb_segment β€” Perform protocol segmentation on skb. that's the whole vibe. that's the assignment. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

like, here's the signature, exactly as it is, no notes:

struct sk_buff * skb_segment (struct sk_buff *head_skb ,
netdev_features_t features );

✨ ARGUMENTS ✨

  • head_skb β€” the buffer to segment. this is the main character, she's getting chopped up 🫢
  • features β€” features for the output path (see dev->features). yeah, check dev->features for the deets, iykyk πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

so this function performs segmentation on the given skb. that's it, that's the job, and she does it so well πŸ’…

she returns a pointer to the first in a list of new skbs for the segments β€” like handing you a whole friend group and going "here, first one's right there" πŸŽ€

and in case of error it returns ERR_PTR(err). so please, please, check for that, okay? don't just start dereferencing it and expecting a slay. that's not giving what you think it's giving πŸ˜­πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

she comes with a whole entourage, fr fr. all of these are hanging out in the Kernel file ./net/core/skbuff.c:

like i said. an entourage. go say hi to all of them πŸ’–


that's the whole page bestie, no cap, nothing skipped. now go segment some skbs and be iconic about it πŸ§šβ€β™€οΈβœ¨

and finally, the cute lil sign-off: this page lives in ./net/core, dated October 2026, and it's filed under skb_segment(9) πŸŽ€πŸ’œπŸ¦‹ ngl, she ate.

πŸ“¦ where this page comes from