skb
skb, short for socket buffer, is the core data structure used by the Linux kernel networking stack to represent packets as they move through the network stack and toward or from devices. It combines the actual packet data with metadata needed for processing, routing, filtering, and delivery to user space.
A typical skb contains a data region and a set of pointers and metadata. The data region
Skbs support linear and non-linear payloads. Non-linear skbs use a fragment list to describe additional page
Lifecycle and memory management are centralized: skbs are reference counted and freed by kfree_skb when the
Overall, the skb data structure is a foundational element enabling efficient, flexible packet handling in the