---
name: "skb_seq_read"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/skb_seq_read"
---

# skb\_seq\_read(9)

Sequentially read skb data

## NAME

skb\_seq\_read - Sequentially read skb data

## SYNOPSIS

**unsigned int skb\_seq\_read(unsigned int** *consumed***, const u8 \*\*** *data***, struct skb\_seq\_state \*** *st***);**

## ARGUMENTS

*consumed*

number of bytes consumed by the caller so far

*data*

destination pointer for data to be returned

*st*

state variable

## DESCRIPTION

Reads a block of skb data at *consumed* relative to the lower offset specified to **skb\_prepare\_seq\_read**. Assigns the head of the data block to *data* and returns the length of the block or 0 if the end of the skb data or the upper offset has been reached.

The caller is not required to consume all of the data returned, i.e. *consumed* is typically set to the number of bytes already consumed and the next call to **skb\_seq\_read** will return the remaining part of the block.

Note 1: The size of each block of data returned can be arbitrary, this limitation is the cost for zerocopy sequential reads of potentially non linear data.

Note 2: Fragment lists within fragments are not implemented at the moment, state-\>root\_skb could be replaced with a stack for this purpose.

## COPYRIGHT
