vlib: convert frame_index into real pointers 66/23566/1
authorSteven Luong <[email protected]>
Wed, 20 Nov 2019 15:37:28 +0000 (07:37 -0800)
committerSteven Luong <[email protected]>
Wed, 20 Nov 2019 15:37:28 +0000 (07:37 -0800)
commitac0e98a67553747b823d8398896559bb07cafe3d
treec8a451e1fb6f9ded081831978ba9cfbcde464cd6
parent187ddfb653aa24246f30851715b9439972a1c3ba
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

Signed-off-by: Steven Luong <[email protected]>
Change-Id: I616fe3fbe501c4e2205cd74840eb95c550603508
src/plugins/avf/input.c
src/plugins/dpdk/device/node.c
src/plugins/memif/node.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