aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/pg
diff options
context:
space:
mode:
authorAndreas Schultz <andreas.schultz@travelping.com>2019-07-15 15:40:56 +0200
committerDave Barach <openvpp@barachs.net>2019-10-30 20:42:38 +0000
commitfaf62c8b20e8335bf0e86a68d34636bf4c312fef (patch)
treeeeea70c8d3418f11bc7c296d51f6e96ec588ba81 /src/vnet/pg
parentdfec10d13772b202eb598ee9b72ab3721e5a1584 (diff)
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 <andreas.schultz@travelping.com> Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit 58b2eb1af562c292feb6d3cdce4656746e61da75)
Diffstat (limited to 'src/vnet/pg')
-rw-r--r--src/vnet/pg/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/pg/input.c b/src/vnet/pg/input.c
index 39f06923072..cee99e5dedc 100644
--- a/src/vnet/pg/input.c
+++ b/src/vnet/pg/input.c
@@ -1568,7 +1568,7 @@ pg_generate_packets (vlib_node_runtime_t * node,
pg_interface_t *pi;
vlib_get_new_next_frame (vm, node, next_index, to_next, n_left);
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);