FD.io VPP
v17.01.1-3-gc6833f8
Vector Packet Processing
|
vlib buffer structure definition and a few select access methods. More...
Go to the source code of this file.
Data Structures | |
struct | vlib_buffer_t |
struct | vlib_buffer_free_list_t |
struct | vlib_buffer_main_t |
struct | vlib_serialize_buffer_main_t |
Typedefs | |
typedef u64 | vlib_copy_unit_t |
typedef struct vlib_buffer_free_list_t | vlib_buffer_free_list_t |
vlib buffer structure definition and a few select access methods.
This structure and the buffer allocation mechanism should perhaps live in vnet, but it would take a lot of typing to make it so.
Definition in file buffer.h.
#define rte_mbuf_from_vlib_buffer | ( | x | ) | (((struct rte_mbuf *)x) - 1) |
#define VLIB_BUFFER_DEFAULT_FREE_LIST_BYTES VLIB_BUFFER_DATA_SIZE |
#define VLIB_BUFFER_FLAG_USER | ( | n | ) | (1 << LOG2_VLIB_BUFFER_FLAG_USER(n)) |
#define vlib_buffer_from_rte_mbuf | ( | x | ) | ((vlib_buffer_t *)(x+1)) |
#define VLIB_BUFFER_HDR_SIZE (sizeof(vlib_buffer_t) - VLIB_BUFFER_PRE_DATA_SIZE) |
#define VLIB_BUFFER_NEXT_PRESENT (1 << VLIB_BUFFER_LOG2_NEXT_PRESENT) |
#define VLIB_BUFFER_TRACE_TRAJECTORY 0 |
#define vlib_prefetch_buffer_header | ( | b, | |
type | |||
) | CLIB_PREFETCH (b, 64, type) |
Prefetch buffer metadata.
The first 64 bytes of buffer contains most header information
b | - (vlib_buffer_t *) pointer to the buffer |
type | - LOAD, STORE. In most cases, STORE is the right answer |
typedef struct vlib_buffer_free_list_t vlib_buffer_free_list_t |
typedef u64 vlib_copy_unit_t |
u32 serialize_close_vlib_buffer | ( | serialize_main_t * | m | ) |
void serialize_open_vlib_buffer | ( | serialize_main_t * | m, |
struct vlib_main_t * | vm, | ||
vlib_serialize_buffer_main_t * | sm | ||
) |
|
inlinestatic |
void unserialize_close_vlib_buffer | ( | serialize_main_t * | m | ) |
void unserialize_open_vlib_buffer | ( | serialize_main_t * | m, |
struct vlib_main_t * | vm, | ||
vlib_serialize_buffer_main_t * | sm | ||
) |
|
inlinestatic |
Advance current data pointer by the supplied (signed!) amount.
b | - (vlib_buffer_t *) pointer to the buffer |
l | - (word) signed increment |
|
inlinestatic |
Get pointer to current data to process.
b | - (vlib_buffer_t *) pointer to the buffer |
|
inlinestatic |
|
inlinestatic |
Reset current header & length to state they were in when packet was received.
b | - (vlib_buffer_t *) pointer to the buffer |
Definition at line 221 of file buffer.h.
|
inlinestatic |
|
inlinestatic |
Get pointer to buffer's opaque data array.
b | - (vlib_buffer_t *) pointer to the buffer |
|
inlinestatic |
Get pointer to buffer's opaque2 data array.
b | - (vlib_buffer_t *) pointer to the buffer |
void* vlib_set_buffer_free_callback | ( | struct vlib_main_t * | vm, |
void * | fp | ||
) |