BUILD_SKB(9) Linux Networking BUILD_SKB(9)NAMEbuild_skb - build a network buffer
SYNOPSIS
struct sk_buff * build_skb(void * data);
ARGUMENTS
data
data buffer provided by caller
DESCRIPTION
Allocate a new sk_buff. Caller provides space holding head and
skb_shared_info. data must have been allocated by kmalloc The return
is the new skb buffer. On a failure the return is NULL, and data is not
freed.
NOTES
Before IO, driver allocates only data buffer where NIC put incoming
frame Driver should add room at head (NET_SKB_PAD) and MUST add room at
tail (SKB_DATA_ALIGN(skb_shared_info)) After IO, driver calls
build_skb, to allocate sk_buff and populate it before giving packet to
stack. RX rings only contains data buffers, not full skbs.
COPYRIGHTKernel Hackers Manual 2.6. November 2013 BUILD_SKB(9)