From 58b2eb1af562c292feb6d3cdce4656746e61da75 Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Mon, 15 Jul 2019 15:40:56 +0200 Subject: vlib: convert frame_index into real pointers The fast path almost always has to deal with the real pointers. Deriving the frame pointer from a frame_index requires a load of the 32bit frame_index from memory, another 64bit load of the heap base pointer and some calculations. Lets store the full pointer instead and do a single 64bit load only. This helps avoiding problems when the heap is grown and frames are allocated below vm->heap_aligned_base. Type: refactor Change-Id: Ifa6e6e984aafe1e2755bff80f0a4dfcddee3623c Signed-off-by: Andreas Schultz Signed-off-by: Dave Barach --- src/plugins/memif/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/memif') diff --git a/src/plugins/memif/node.c b/src/plugins/memif/node.c index 07ce76dc6d5..a4b8245b520 100644 --- a/src/plugins/memif/node.c +++ b/src/plugins/memif/node.c @@ -364,7 +364,7 @@ memif_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t *f; ethernet_input_frame_t *ef; nf = vlib_node_runtime_get_next_frame (vm, node, next_index); - f = vlib_get_frame (vm, nf->frame_index); + f = vlib_get_frame (vm, nf->frame); f->flags = ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX; ef = vlib_frame_scalar_args (f); -- cgit 1.2.3-korg