![]() |
FD.io VPP
v20.05.1-6-gf53edbc3b
Vector Packet Processing
|
vlib buffer access methods. More...
Include dependency graph for buffer_funcs.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | vlib_packet_template_t |
Macros | |
| #define | vlib_prefetch_buffer_with_index(vm, bi, type) |
| Prefetch buffer metadata by buffer index The first 64 bytes of buffer contains most header information. More... | |
| #define | VLIB_BUFFER_COPY_CLONE_FLAGS_MASK |
Enumerations | |
| enum | vlib_buffer_known_state_t { VLIB_BUFFER_UNKNOWN, VLIB_BUFFER_KNOWN_FREE, VLIB_BUFFER_KNOWN_ALLOCATED } |
Variables | |
| format_function_t | format_vlib_buffer |
| format_function_t | format_vlib_buffer_and_data |
| format_function_t | format_vlib_buffer_contents |
| format_function_t | format_vlib_buffer_no_chain |
vlib buffer access methods.
Definition in file buffer_funcs.h.
| #define VLIB_BUFFER_COPY_CLONE_FLAGS_MASK |
Definition at line 1030 of file buffer_funcs.h.
Prefetch buffer metadata by buffer index The first 64 bytes of buffer contains most header information.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| bi | - (u32) buffer index |
| type | - LOAD, STORE. In most cases, STORE is the right answer |
Definition at line 476 of file buffer_funcs.h.
| Enumerator | |
|---|---|
| VLIB_BUFFER_UNKNOWN | |
| VLIB_BUFFER_KNOWN_FREE | |
| VLIB_BUFFER_KNOWN_ALLOCATED | |
Definition at line 482 of file buffer_funcs.h.
| STATIC_ASSERT_OFFSET_OF | ( | vlib_buffer_t | , |
| template_end | , | ||
| 64 | |||
| ) |
Here is the caller graph for this function:| int vlib_buffer_add_data | ( | vlib_main_t * | vm, |
| u32 * | buffer_index, | ||
| void * | data, | ||
| u32 | n_data_bytes | ||
| ) |
|
inlinestatic |
Allocate buffers into supplied array.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| buffers | - (u32 * ) buffer index array |
| n_buffers | - (u32) number of buffers requested |
Definition at line 677 of file buffer_funcs.h.
Here is the call graph for this function:
|
inlinestatic |
Allocate buffers from specific pool into supplied array.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| buffers | - (u32 * ) buffer index array |
| n_buffers | - (u32) number of buffers requested |
Definition at line 566 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Allocate buffers from specific numa node into supplied array.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| buffers | - (u32 * ) buffer index array |
| n_buffers | - (u32) number of buffers requested |
| numa_node | - (u32) numa node |
Definition at line 660 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Allocate buffers into ring.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| buffers | - (u32 * ) buffer index ring |
| start | - (u32) first slot in the ring |
| ring_size | - (u32) ring size |
| n_buffers | - (u32) number of buffers requested |
Definition at line 693 of file buffer_funcs.h.
Here is the call graph for this function:
|
inlinestatic |
Allocate buffers into ring from specific buffer pool.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| buffers | - (u32 * ) buffer index ring |
| start | - (u32) first slot in the ring |
| ring_size | - (u32) ring size |
| n_buffers | - (u32) number of buffers requested |
Definition at line 722 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Attach cloned tail to the buffer.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| head | - (vlib_buffer_t *) head buffer |
| tail | - (Vlib buffer_t *) tail buffer to clone and attach to head |
Definition at line 1298 of file buffer_funcs.h.
Here is the call graph for this function:
|
inlinestatic |
| u16 vlib_buffer_chain_append_data_with_alloc | ( | vlib_main_t * | vm, |
| vlib_buffer_t * | first, | ||
| vlib_buffer_t ** | last, | ||
| void * | data, | ||
| u16 | data_len | ||
| ) |
|
inlinestatic |
Definition at line 1334 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
inlinestatic |
Definition at line 1324 of file buffer_funcs.h.
|
inlinestatic |
Definition at line 1427 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:| void vlib_buffer_chain_validate | ( | vlib_main_t * | vm, |
| vlib_buffer_t * | first | ||
| ) |
Here is the caller graph for this function:
|
inlinestatic |
Create multiple clones of buffer and store them in the supplied array.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| src_buffer | - (u32) source buffer index |
| buffers | - (u32 * ) buffer index array |
| n_buffers | - (u16) number of buffer clones requested (<=256) |
| head_end_offset | - (u16) offset relative to current position where packet head ends |
Definition at line 1283 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Create a maximum of 256 clones of buffer and store them in the supplied array.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| src_buffer | - (u32) source buffer index |
| buffers | - (u32 * ) buffer index array |
| n_buffers | - (u16) number of buffer clones requested (<=256) |
| head_end_offset | - (u16) offset relative to current position where packet head ends |
| offset | - (i16) copy packet head at current position if 0, else at offset position to change headroom space as specified |
Definition at line 1154 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Create multiple clones of buffer and store them in the supplied array.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| src_buffer | - (u32) source buffer index |
| buffers | - (u32 * ) buffer index array |
| n_buffers | - (u16) number of buffer clones requested (<=256) |
| head_end_offset | - (u16) offset relative to current position where packet head ends |
| offset | - (i16) copy packet head at current position if 0, else at offset position to change headroom space as specified |
Definition at line 1247 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Copy buffer contents to memory.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| buffer_index | - (u32) buffer index |
| contents | - (u8 *) memory, must be large enough |
Definition at line 436 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1036 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:| static_always_inline void vlib_buffer_copy_indices | ( | u32 * | dst, |
| u32 * | src, | ||
| u32 | n_indices | ||
| ) |
|
inlinestatic |
Definition at line 162 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1095 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:| static_always_inline void vlib_buffer_copy_template | ( | vlib_buffer_t * | b, |
| vlib_buffer_t * | bt | ||
| ) |
|
inlinestatic |
Free buffers Frees the entire buffer chain for each buffer.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| buffers | - (u32 * ) buffer index array |
| n_buffers | - (u32) number of buffers to free |
Definition at line 937 of file buffer_funcs.h.
Here is the call graph for this function:
|
inlinestatic |
Free buffers from ring.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| buffers | - (u32 * ) buffer index ring |
| start | - (u32) first slot in the ring |
| ring_size | - (u32) ring size |
| n_buffers | - (u32) number of buffers |
Definition at line 984 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Free buffers from ring without freeing tail buffers.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| buffers | - (u32 * ) buffer index ring |
| start | - (u32) first slot in the ring |
| ring_size | - (u32) ring size |
| n_buffers | - (u32) number of buffers |
Definition at line 1009 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:| static_always_inline void vlib_buffer_free_inline | ( | vlib_main_t * | vm, |
| u32 * | buffers, | ||
| u32 | n_buffers, | ||
| int | maybe_next | ||
| ) |
Definition at line 779 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Free buffers, does not free the buffer chain for each buffer.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| buffers | - (u32 * ) buffer index array |
| n_buffers | - (u32) number of buffers to free |
Definition at line 954 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Free one buffer Shorthand to free a single buffer chain.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| buffer_index | - (u32) buffer index to free |
Definition at line 970 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 463 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:| static_always_inline u32 vlib_buffer_get_default_data_size | ( | vlib_main_t * | vm | ) |
|
inlinestatic |
Definition at line 457 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Get length in bytes of the buffer index buffer chain.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| bi | - (u32) buffer index |
Definition at line 422 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 498 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Get length in bytes of the buffer chain.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| b | - (void *) buffer pointer |
Definition at line 402 of file buffer_funcs.h.
Here is the call graph for this function:| uword vlib_buffer_length_in_chain_slow_path | ( | vlib_main_t * | vm, |
| vlib_buffer_t * | b_first | ||
| ) |
|
inlinestatic |
Definition at line 1121 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:| static_always_inline uword vlib_buffer_pool_get | ( | vlib_main_t * | vm, |
| u8 | buffer_pool_index, | ||
| u32 * | buffers, | ||
| u32 | n_buffers | ||
| ) |
Definition at line 528 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
| static_always_inline void vlib_buffer_pool_put | ( | vlib_main_t * | vm, |
| u8 | buffer_pool_index, | ||
| u32 * | buffers, | ||
| u32 | n_buffers | ||
| ) |
Definition at line 745 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1420 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 55 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:| void vlib_buffer_validate_alloc_free | ( | vlib_main_t * | vm, |
| u32 * | buffers, | ||
| uword | n_buffers, | ||
| vlib_buffer_known_state_t | expected_state | ||
| ) |
|
inlinestatic |
Translate buffer index into buffer pointer.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| buffer_index | - (u32) buffer index |
Definition at line 85 of file buffer_funcs.h.
Here is the call graph for this function:
|
inlinestatic |
Translate buffer pointer into buffer index.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| p | - (void *) buffer pointer |
Definition at line 293 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:| static_always_inline void vlib_get_buffer_indices | ( | vlib_main_t * | vm, |
| vlib_buffer_t ** | b, | ||
| u32 * | bi, | ||
| uword | count | ||
| ) |
Translate array of buffer pointers into buffer indices.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| b | - (vlib_buffer_t **) array of buffer pointers |
| bi | - (u32 *) array to store buffer indices |
| count | - (uword) number of elements |
Definition at line 373 of file buffer_funcs.h.
Here is the call graph for this function:| static_always_inline void vlib_get_buffer_indices_with_offset | ( | vlib_main_t * | vm, |
| void ** | b, | ||
| u32 * | bi, | ||
| uword | count, | ||
| i32 | offset | ||
| ) |
Translate array of buffer pointers into buffer indices with offset.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| b | - (void **) array of buffer pointers |
| bi | - (u32 *) array to store buffer indices |
| count | - (uword) number of elements |
| offset | - (i32) offset applied to each pointer |
Definition at line 312 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:| static_always_inline vlib_buffer_pool_t* vlib_get_buffer_pool | ( | vlib_main_t * | vm, |
| u8 | buffer_pool_index | ||
| ) |
| static_always_inline void vlib_get_buffers | ( | vlib_main_t * | vm, |
| u32 * | bi, | ||
| vlib_buffer_t ** | b, | ||
| int | count | ||
| ) |
Translate array of buffer indices into buffer pointers.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| bi | - (u32 *) array of buffer indices |
| b | - (vlib_buffer_t **) array to store buffer pointers |
| count | - (uword) number of elements |
Definition at line 280 of file buffer_funcs.h.
Here is the call graph for this function:| static_always_inline void vlib_get_buffers_with_offset | ( | vlib_main_t * | vm, |
| u32 * | bi, | ||
| void ** | b, | ||
| int | count, | ||
| i32 | offset | ||
| ) |
Translate array of buffer indices into buffer pointers with offset.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| bi | - (u32 *) array of buffer indices |
| b | - (void **) array to store buffer pointers |
| count | - (uword) number of elements |
| offset | - (i32) offset applied to each pointer |
Definition at line 214 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Get next buffer in buffer linklist, or zero for end of list.
| vm | - (vlib_main_t *) vlib main data structure pointer |
| b | - (void *) buffer pointer |
Definition at line 386 of file buffer_funcs.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1414 of file buffer_funcs.h.
| void* vlib_packet_template_get_packet | ( | vlib_main_t * | vm, |
| vlib_packet_template_t * | t, | ||
| u32 * | bi_result | ||
| ) |
| void vlib_packet_template_init | ( | vlib_main_t * | vm, |
| vlib_packet_template_t * | t, | ||
| void * | packet_data, | ||
| uword | n_packet_data_bytes, | ||
| uword | min_n_buffers_each_alloc, | ||
| char * | fmt, | ||
| ... | |||
| ) |
| u8* vlib_validate_buffer | ( | vlib_main_t * | vm, |
| u32 | buffer_index, | ||
| uword | follow_chain | ||
| ) |
| u8* vlib_validate_buffers | ( | vlib_main_t * | vm, |
| u32 * | buffers, | ||
| uword | next_buffer_stride, | ||
| uword | n_buffers, | ||
| vlib_buffer_known_state_t | known_state, | ||
| uword | follow_buffer_next | ||
| ) |
| format_function_t format_vlib_buffer |
Definition at line 1388 of file buffer_funcs.h.
| format_function_t format_vlib_buffer_and_data |
Definition at line 1388 of file buffer_funcs.h.
| format_function_t format_vlib_buffer_contents |
Definition at line 1388 of file buffer_funcs.h.
| format_function_t format_vlib_buffer_no_chain |
Definition at line 1388 of file buffer_funcs.h.