'\" t .\" Title: netdev_alloc_skb .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Linux Networking .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "NETDEV_ALLOC_SKB" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Linux Networking" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" netdev_alloc_skb \- allocate an skbuff for rx on a specific device .SH "SYNOPSIS" .HP \w'struct\ sk_buff\ *\ netdev_alloc_skb('u .BI "struct sk_buff * netdev_alloc_skb(struct\ net_device\ *\ " "dev" ", unsigned\ int\ " "length" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 network device to receive on .RE .PP \fIlength\fR .RS 4 length to allocate .RE .SH "DESCRIPTION" .PP Allocate a new sk_buff and assign it a usage count of one\&. The buffer has unspecified headroom built in\&. Users should allocate the headroom they think they need without accounting for the built in space\&. The built in space is used for optimisations\&. .PP \fBNULL\fR is returned if there is no free memory\&. Although this function allocates memory it can be called from an interrupt\&. .SH "COPYRIGHT" .br