FD.io VPP
v19.08.3-2-gbabecb413
Vector Packet Processing
|
vlib buffer/node functions More...
Go to the source code of this file.
Macros | |
#define | vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1) |
Finish enqueueing two buffers forward in the graph. More... | |
#define | vlib_validate_buffer_enqueue_x4(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, bi2, bi3, next0, next1, next2, next3) |
Finish enqueueing four buffers forward in the graph. More... | |
#define | vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0) |
Finish enqueueing one buffer forward in the graph. More... | |
Functions | |
static uword | generic_buffer_node_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, uword sizeof_trace, void *opaque1, uword opaque2, void(*two_buffers)(vlib_main_t *vm, void *opaque1, uword opaque2, vlib_buffer_t *b0, vlib_buffer_t *b1, u32 *next0, u32 *next1), void(*one_buffer)(vlib_main_t *vm, void *opaque1, uword opaque2, vlib_buffer_t *b0, u32 *next0)) |
static_always_inline void | vlib_buffer_enqueue_to_next (vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, u16 *nexts, uword count) |
static_always_inline void | vlib_buffer_enqueue_to_single_next (vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, u16 next_index, u32 count) |
static_always_inline u32 | vlib_buffer_enqueue_to_thread (vlib_main_t *vm, u32 frame_queue_index, u32 *buffer_indices, u16 *thread_indices, u32 n_packets, int drop_on_congestion) |
vlib buffer/node functions
Definition in file buffer_node.h.
#define vlib_validate_buffer_enqueue_x1 | ( | vm, | |
node, | |||
next_index, | |||
to_next, | |||
n_left_to_next, | |||
bi0, | |||
next0 | |||
) |
Finish enqueueing one buffer forward in the graph.
Standard single loop boilerplate element. This is a MACRO, with MULTIPLE SIDE EFFECTS. In the ideal case, next_index == next0
, which means that the speculative enqueue at the top of the single loop has correctly dealt with the packet in hand. In that case, the macro does nothing at all.
vm | vlib_main_t pointer, varies by thread |
node | current node vlib_node_runtime_t pointer |
next_index | speculated next index used for both packets |
to_next | speculated vector pointer used for both packets |
n_left_to_next | number of slots left in speculated vector |
bi0 | first buffer index |
next0 | actual next index to be used for the first packet |
next_index
– speculative next index to be used for future packets to_next
– speculative frame to be used for future packets n_left_to_next
– number of slots left in speculative frame Definition at line 218 of file buffer_node.h.
#define vlib_validate_buffer_enqueue_x2 | ( | vm, | |
node, | |||
next_index, | |||
to_next, | |||
n_left_to_next, | |||
bi0, | |||
bi1, | |||
next0, | |||
next1 | |||
) |
Finish enqueueing two buffers forward in the graph.
Standard dual loop boilerplate element. This is a MACRO, with MULTIPLE SIDE EFFECTS. In the ideal case, next_index == next0 == next1
, which means that the speculative enqueue at the top of the dual loop has correctly dealt with both packets. In that case, the macro does nothing at all.
vm | vlib_main_t pointer, varies by thread |
node | current node vlib_node_runtime_t pointer |
next_index | speculated next index used for both packets |
to_next | speculated vector pointer used for both packets |
n_left_to_next | number of slots left in speculated vector |
bi0 | first buffer index |
bi1 | second buffer index |
next0 | actual next index to be used for the first packet |
next1 | actual next index to be used for the second packet |
next_index
– speculative next index to be used for future packets to_next
– speculative frame to be used for future packets n_left_to_next
– number of slots left in speculative frame Definition at line 70 of file buffer_node.h.
#define vlib_validate_buffer_enqueue_x4 | ( | vm, | |
node, | |||
next_index, | |||
to_next, | |||
n_left_to_next, | |||
bi0, | |||
bi1, | |||
bi2, | |||
bi3, | |||
next0, | |||
next1, | |||
next2, | |||
next3 | |||
) |
Finish enqueueing four buffers forward in the graph.
Standard quad loop boilerplate element. This is a MACRO, with MULTIPLE SIDE EFFECTS. In the ideal case, next_index == next0 == next1 == next2 == next3
, which means that the speculative enqueue at the top of the quad loop has correctly dealt with all four packets. In that case, the macro does nothing at all.
vm | vlib_main_t pointer, varies by thread |
node | current node vlib_node_runtime_t pointer |
next_index | speculated next index used for both packets |
to_next | speculated vector pointer used for both packets |
n_left_to_next | number of slots left in speculated vector |
bi0 | first buffer index |
bi1 | second buffer index |
bi2 | third buffer index |
bi3 | fourth buffer index |
next0 | actual next index to be used for the first packet |
next1 | actual next index to be used for the second packet |
next2 | actual next index to be used for the third packet |
next3 | actual next index to be used for the fourth packet |
next_index
– speculative next index to be used for future packets to_next
– speculative frame to be used for future packets n_left_to_next
– number of slots left in speculative frame Definition at line 138 of file buffer_node.h.
|
inlinestatic |
static_always_inline void vlib_buffer_enqueue_to_next | ( | vlib_main_t * | vm, |
vlib_node_runtime_t * | node, | ||
u32 * | buffers, | ||
u16 * | nexts, | ||
uword | count | ||
) |
Definition at line 332 of file buffer_node.h.
static_always_inline void vlib_buffer_enqueue_to_single_next | ( | vlib_main_t * | vm, |
vlib_node_runtime_t * | node, | ||
u32 * | buffers, | ||
u16 | next_index, | ||
u32 | count | ||
) |
Definition at line 452 of file buffer_node.h.
static_always_inline u32 vlib_buffer_enqueue_to_thread | ( | vlib_main_t * | vm, |
u32 | frame_queue_index, | ||
u32 * | buffer_indices, | ||
u16 * | thread_indices, | ||
u32 | n_packets, | ||
int | drop_on_congestion | ||
) |
Definition at line 487 of file buffer_node.h.