![]() |
FD.io VPP
v18.01.2-1-g9b554f3
Vector Packet Processing
|
vlib buffer structure definition and a few select access methods. More...
Include dependency graph for buffer.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | vlib_buffer_t |
| struct | vlib_buffer_free_list_t |
| struct | vlib_buffer_callbacks_t |
| struct | vlib_buffer_pool_t |
| struct | vlib_buffer_main_t |
| struct | vlib_serialize_buffer_main_t |
Typedefs | |
| typedef struct vlib_buffer_free_list_t | vlib_buffer_free_list_t |
| typedef uword( | vlib_buffer_fill_free_list_cb_t) (struct vlib_main_t *vm, vlib_buffer_free_list_t *fl, uword min_free_buffers) |
| typedef void( | vlib_buffer_free_cb_t) (struct vlib_main_t *vm, u32 *buffers, u32 n_buffers) |
| typedef void( | vlib_buffer_free_no_next_cb_t) (struct vlib_main_t *vm, u32 *buffers, u32 n_buffers) |
Variables | |
| vlib_buffer_callbacks_t * | vlib_buffer_callbacks |
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 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_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_REGISTER_CALLBACKS | ( | x, | |
| ... | |||
| ) |
| #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 uword( vlib_buffer_fill_free_list_cb_t) (struct vlib_main_t *vm, vlib_buffer_free_list_t *fl, uword min_free_buffers) |
| typedef void( vlib_buffer_free_cb_t) (struct vlib_main_t *vm, u32 *buffers, u32 n_buffers) |
| typedef struct vlib_buffer_free_list_t vlib_buffer_free_list_t |
| typedef void( vlib_buffer_free_no_next_cb_t) (struct vlib_main_t *vm, u32 *buffers, u32 n_buffers) |
| u32 serialize_close_vlib_buffer | ( | serialize_main_t * | m | ) |
Definition at line 204 of file buffer_serialize.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void serialize_open_vlib_buffer | ( | serialize_main_t * | m, |
| struct vlib_main_t * | vm, | ||
| vlib_serialize_buffer_main_t * | sm | ||
| ) |
Definition at line 190 of file buffer_serialize.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
| void unserialize_close_vlib_buffer | ( | serialize_main_t * | m | ) |
Definition at line 229 of file buffer_serialize.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void unserialize_open_vlib_buffer | ( | serialize_main_t * | m, |
| struct vlib_main_t * | vm, | ||
| vlib_serialize_buffer_main_t * | sm | ||
| ) |
Definition at line 197 of file buffer_serialize.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u8 vlib_buffer_add_physmem_region | ( | struct vlib_main_t * | vm, |
| vlib_physmem_region_index_t | region | ||
| ) |
|
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 |
Check if there is enough space in buffer to advance.
| b | - (vlib_buffer_t *) pointer to the buffer |
| l | - (word) size to check |
Definition at line 222 of file buffer.h.
Here is the caller graph for this function:| clib_error_t* vlib_buffer_main_init | ( | struct vlib_main_t * | vm | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
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 234 of file buffer.h.
Here is the caller graph for this function:
|
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 | ||
| ) |
| vlib_buffer_callbacks_t* vlib_buffer_callbacks |