vlib: convert frame_index into real pointers 21/23121/1
authorAndreas Schultz <andreas.schultz@travelping.com>
Mon, 15 Jul 2019 13:40:56 +0000 (15:40 +0200)
committerDave Barach <openvpp@barachs.net>
Wed, 30 Oct 2019 20:42:38 +0000 (20:42 +0000)
commitfaf62c8b20e8335bf0e86a68d34636bf4c312fef
treeeeea70c8d3418f11bc7c296d51f6e96ec588ba81
parentdfec10d13772b202eb598ee9b72ab3721e5a1584
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)
src/plugins/avf/input.c
src/plugins/dpdk/device/node.c
src/plugins/memif/node.c
src/plugins/rdma/input.c
src/vlib/main.c
src/vlib/node.h
src/vlib/node_funcs.h
src/vnet/devices/virtio/vhost_user_input.c
src/vnet/pg/input.c
src/vnet/unix/gdb_funcs.c