diff options
author | Damjan Marion <damarion@cisco.com> | 2021-04-21 12:55:15 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2021-04-21 18:30:44 +0000 |
commit | 1c2297144a37ea6a42f5deec6e1613a297de3321 (patch) | |
tree | 50bd911530c429ad1bd90c3575d96e59d2957ed1 /src/vlib/buffer_funcs.h | |
parent | 09aeee64da0609d027fd7d55525c8f080cbede8e (diff) |
vlib: don't inline vlib_buffer_enqueue_to_*
Function call in this case is not bad thing, as those functions
are called once per frame.
Type: improvement
Change-Id: I7bd61cf746b905e2c8e3085ebb2ff001c0a52da8
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/buffer_funcs.h')
-rw-r--r-- | src/vlib/buffer_funcs.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vlib/buffer_funcs.h b/src/vlib/buffer_funcs.h index f1be94c61f4..e4427d6c382 100644 --- a/src/vlib/buffer_funcs.h +++ b/src/vlib/buffer_funcs.h @@ -51,6 +51,26 @@ vlib buffer access methods. */ +typedef void (vlib_buffer_enqueue_to_next_fn_t) (vlib_main_t *vm, + vlib_node_runtime_t *node, + u32 *buffers, u16 *nexts, + uword count); +typedef void (vlib_buffer_enqueue_to_single_next_fn_t) ( + vlib_main_t *vm, vlib_node_runtime_t *node, u32 *ers, u16 next_index, + u32 count); + +typedef u32 (vlib_buffer_enqueue_to_thread_fn_t) ( + vlib_main_t *vm, u32 frame_queue_index, u32 *buffer_indices, + u16 *thread_indices, u32 n_packets, int drop_on_congestion); +typedef struct +{ + vlib_buffer_enqueue_to_next_fn_t *buffer_enqueue_to_next_fn; + vlib_buffer_enqueue_to_single_next_fn_t *buffer_enqueue_to_single_next_fn; + vlib_buffer_enqueue_to_thread_fn_t *buffer_enqueue_to_thread_fn; +} vlib_buffer_func_main_t; + +extern vlib_buffer_func_main_t vlib_buffer_func_main; + always_inline void vlib_buffer_validate (vlib_main_t * vm, vlib_buffer_t * b) { |