FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
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... | |
#define | VLIB_BUFFER_ENQUEUE_MIN_SIZE(n) round_pow2 ((n), 64) |
vlib buffer/node functions
Definition in file buffer_node.h.
#define VLIB_BUFFER_ENQUEUE_MIN_SIZE | ( | n | ) | round_pow2 ((n), 64) |
Definition at line 347 of 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 224 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 140 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 | ||
) |
static_always_inline void vlib_buffer_enqueue_to_next_vec | ( | vlib_main_t * | vm, |
vlib_node_runtime_t * | node, | ||
u32 ** | buffers, | ||
u16 ** | nexts, | ||
uword | count | ||
) |
Definition at line 359 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 | ||
) |
static_always_inline u32 vlib_buffer_enqueue_to_thread | ( | vlib_main_t * | vm, |
vlib_node_runtime_t * | node, | ||
u32 | frame_queue_index, | ||
u32 * | buffer_indices, | ||
u16 * | thread_indices, | ||
u32 | n_packets, | ||
int | drop_on_congestion | ||
) |