__netdev_alloc_skb(9)

__netdev_alloc_skb9

Allocate an skbuff for rx on a specific device

Usage

struct sk_buff * __netdev_alloc_skb(struct net_device * dev, unsigned int len, gfp_t gfp_mask);

Arguments

dev

network device to receive on

len

length to allocate

gfp_mask

get_free_pages mask, passed to alloc_skb

Overview

Allocate a new sk_buff and assign it a usage count of one. The buffer has NET_SKB_PAD 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.

NULL is returned if there is no free memory.

Releases

6 releases since Debian 4.0 (Etch); the text changed 5 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.