skb_zerocopy(9)

skb_zerocopy9

Zero copy skb to skb

Usage

int skb_zerocopy(struct sk_buff * to, struct sk_buff * from, int len, int hlen);

Arguments

to

destination buffer

from

source buffer

len

number of bytes to copy from source buffer

hlen

size of linear headroom in destination buffer

Overview

Copies up to `len` bytes from `from` to `to` by creating references to the frags in the source buffer.

The `hlen` as calculated by skb_zerocopy_headlen specifies the headroom in the `to` buffer.

Return value: 0: everything is OK -ENOMEM: couldn't orphan frags of from due to lack of memory -EFAULT: skb_copy_bits found some problem with skb geometry

Releases

2 releases since Debian 8 (Jessie); the text changed 1 time.

  1. 8
  2. 9

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