aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-01-31 15:36:47 +0100
committerDamjan Marion <dmarion@me.com>2019-02-01 09:09:25 +0000
commit791b7ace176ab13e353ed5d88aa9f90db135404f (patch)
treefaba05aed0506c06941e02ec6cd3cb5ec9846321
parent9e315958d6c9654a988439ae463b1a85cd03bebb (diff)
memif: fix buffer prefetch
Change-Id: If514366be7385c64cafc03329f66b44380556daa Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--src/plugins/memif/node.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/memif/node.c b/src/plugins/memif/node.c
index c78a728bacd..28fd10ef7b5 100644
--- a/src/plugins/memif/node.c
+++ b/src/plugins/memif/node.c
@@ -383,10 +383,11 @@ memif_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
while (n_from >= 8)
{
- b0 = vlib_get_buffer (vm, po[4].first_buffer_vec_index);
- b1 = vlib_get_buffer (vm, po[5].first_buffer_vec_index);
- b2 = vlib_get_buffer (vm, po[6].first_buffer_vec_index);
- b3 = vlib_get_buffer (vm, po[7].first_buffer_vec_index);
+ b0 = vlib_get_buffer (vm, ptd->buffers[po[0].first_buffer_vec_index]);
+ b1 = vlib_get_buffer (vm, ptd->buffers[po[1].first_buffer_vec_index]);
+ b2 = vlib_get_buffer (vm, ptd->buffers[po[2].first_buffer_vec_index]);
+ b3 = vlib_get_buffer (vm, ptd->buffers[po[3].first_buffer_vec_index]);
+
vlib_prefetch_buffer_header (b0, STORE);
vlib_prefetch_buffer_header (b1, STORE);
vlib_prefetch_buffer_header (b2, STORE);