FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
vlib_buffer_t Struct Reference

Public Member Functions

 CLIB_CACHE_LINE_ALIGN_MARK (cacheline0)
 
 STRUCT_MARK (template_start)
 
 STRUCT_MARK (template_end)
 
 CLIB_CACHE_LINE_ALIGN_MARK (cacheline1)
 
 CLIB_CACHE_LINE_ALIGN_MARK (cacheline2)
 

Data Fields

i16 current_data
 signed offset in data[], pre_data[] that we are currently processing. More...
 
u16 current_length
 Nbytes between current data and the end of this buffer. More...
 
u32 flags
 buffer flags:
VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,
VLIB_BUFFER_IS_TRACED: trace this buffer. More...
 
u32 flow_id
 Generic flow identifier. More...
 
u32 next_buffer
 Next buffer for this linked-list of buffers. More...
 
u32 current_config_index
 Used by feature subgraph arcs to visit enabled feature nodes. More...
 
vlib_error_t error
 Error code for buffers to be enqueued to error handler. More...
 
u8 n_add_refs
 Number of additional references to this buffer. More...
 
u8 buffer_pool_index
 index of buffer pool this buffer belongs. More...
 
u32 opaque [10]
 Opaque data used by sub-graphs for their own purposes. More...
 
u32 trace_index
 Specifies index into trace buffer if VLIB_PACKET_IS_TRACED flag is set. More...
 
u32 recycle_count
 Used by L2 path recycle code. More...
 
u32 total_length_not_including_first_buffer
 Only valid for first buffer in chain. More...
 
vlib_buffer_free_list_index_t free_list_index
 
u8 align_pad [3]
 < only used if VLIB_BUFFER_NON_DEFAULT_FREELIST flag is set More...
 
u32 opaque2 [12]
 More opaque data, see ../vnet/vnet/buffer.h. More...
 
u8 pre_data [VLIB_BUFFER_PRE_DATA_SIZE]
 Space for inserting data before buffer start. More...
 
u8 data [0]
 Packet data. More...
 

Detailed Description

Definition at line 104 of file buffer.h.

Member Function Documentation

◆ CLIB_CACHE_LINE_ALIGN_MARK() [1/3]

vlib_buffer_t::CLIB_CACHE_LINE_ALIGN_MARK ( cacheline0  )

◆ CLIB_CACHE_LINE_ALIGN_MARK() [2/3]

vlib_buffer_t::CLIB_CACHE_LINE_ALIGN_MARK ( cacheline1  )

◆ CLIB_CACHE_LINE_ALIGN_MARK() [3/3]

vlib_buffer_t::CLIB_CACHE_LINE_ALIGN_MARK ( cacheline2  )

◆ STRUCT_MARK() [1/2]

vlib_buffer_t::STRUCT_MARK ( template_start  )

◆ STRUCT_MARK() [2/2]

vlib_buffer_t::STRUCT_MARK ( template_end  )

Field Documentation

◆ align_pad

u8 vlib_buffer_t::align_pad[3]

< only used if VLIB_BUFFER_NON_DEFAULT_FREELIST flag is set

available

Definition at line 163 of file buffer.h.

◆ buffer_pool_index

u8 vlib_buffer_t::buffer_pool_index

index of buffer pool this buffer belongs.

Definition at line 144 of file buffer.h.

◆ current_config_index

u32 vlib_buffer_t::current_config_index

Used by feature subgraph arcs to visit enabled feature nodes.

Definition at line 136 of file buffer.h.

◆ current_data

i16 vlib_buffer_t::current_data

signed offset in data[], pre_data[] that we are currently processing.

If negative current header points into predata area.

Definition at line 110 of file buffer.h.

◆ current_length

u16 vlib_buffer_t::current_length

Nbytes between current data and the end of this buffer.

Definition at line 114 of file buffer.h.

◆ data

u8 vlib_buffer_t::data[0]

Packet data.

Hardware DMA here

Definition at line 176 of file buffer.h.

◆ error

vlib_error_t vlib_buffer_t::error

Error code for buffers to be enqueued to error handler.

Definition at line 139 of file buffer.h.

◆ flags

u32 vlib_buffer_t::flags

buffer flags:
VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,
VLIB_BUFFER_IS_TRACED: trace this buffer.


VLIB_BUFFER_NEXT_PRESENT: this is a multi-chunk buffer.
VLIB_BUFFER_TOTAL_LENGTH_VALID: as it says
VLIB_BUFFER_EXT_HDR_VALID: buffer contains valid external buffer manager header, set to avoid adding it to a flow report
VLIB_BUFFER_FLAG_USER(n): user-defined bit N

Definition at line 117 of file buffer.h.

◆ flow_id

u32 vlib_buffer_t::flow_id

Generic flow identifier.

Definition at line 127 of file buffer.h.

◆ free_list_index

vlib_buffer_free_list_index_t vlib_buffer_t::free_list_index

Definition at line 160 of file buffer.h.

◆ n_add_refs

u8 vlib_buffer_t::n_add_refs

Number of additional references to this buffer.

Definition at line 142 of file buffer.h.

◆ next_buffer

u32 vlib_buffer_t::next_buffer

Next buffer for this linked-list of buffers.

Only valid if VLIB_BUFFER_NEXT_PRESENT flag is set.

Definition at line 130 of file buffer.h.

◆ opaque

u32 vlib_buffer_t::opaque[10]

Opaque data used by sub-graphs for their own purposes.

See .../vnet/vnet/buffer.h

Definition at line 146 of file buffer.h.

◆ opaque2

u32 vlib_buffer_t::opaque2[12]

More opaque data, see ../vnet/vnet/buffer.h.

Definition at line 164 of file buffer.h.

◆ pre_data

u8 vlib_buffer_t::pre_data[VLIB_BUFFER_PRE_DATA_SIZE]

Space for inserting data before buffer start.

Packet rewrite string will be rewritten backwards and may extend back before buffer->data[0]. Must come directly before packet data.

Definition at line 168 of file buffer.h.

◆ recycle_count

u32 vlib_buffer_t::recycle_count

Used by L2 path recycle code.

Definition at line 154 of file buffer.h.

◆ total_length_not_including_first_buffer

u32 vlib_buffer_t::total_length_not_including_first_buffer

Only valid for first buffer in chain.

Current length plus total length given here give total number of bytes in buffer chain.

Definition at line 156 of file buffer.h.

◆ trace_index

u32 vlib_buffer_t::trace_index

Specifies index into trace buffer if VLIB_PACKET_IS_TRACED flag is set.

Definition at line 151 of file buffer.h.


The documentation for this struct was generated from the following file: