aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-05-02 05:15:16 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2018-05-03 21:21:14 +0000
commitbd4d645791a4d58dbdb0b5dc1b1527b11599c332 (patch)
tree076ab926e1493beb6064bfafd2fdce35153e166a /src/vnet
parent72c419cc9e2e4749bed64c45cf1bca318a16ea70 (diff)
MPLS prefetch fixes
Change-Id: I565d79af410825c72f291ab40178883b1bc6f1df Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/mpls/mpls_input.c8
-rw-r--r--src/vnet/mpls/mpls_lookup.c22
2 files changed, 15 insertions, 15 deletions
diff --git a/src/vnet/mpls/mpls_input.c b/src/vnet/mpls/mpls_input.c
index d1881d4050b..d77fd4cd7e3 100644
--- a/src/vnet/mpls/mpls_input.c
+++ b/src/vnet/mpls/mpls_input.c
@@ -109,11 +109,11 @@ mpls_input_inline (vlib_main_t * vm,
p2 = vlib_get_buffer (vm, from[2]);
p3 = vlib_get_buffer (vm, from[3]);
- vlib_prefetch_buffer_header (p2, STORE);
- vlib_prefetch_buffer_header (p3, STORE);
+ vlib_prefetch_buffer_header (p2, LOAD);
+ vlib_prefetch_buffer_header (p3, LOAD);
- CLIB_PREFETCH (p2->data, sizeof (h0[0]), STORE);
- CLIB_PREFETCH (p3->data, sizeof (h1[0]), STORE);
+ CLIB_PREFETCH (p2->data, sizeof (h0[0]), LOAD);
+ CLIB_PREFETCH (p3->data, sizeof (h1[0]), LOAD);
}
bi0 = to_next[0] = from[0];
diff --git a/src/vnet/mpls/mpls_lookup.c b/src/vnet/mpls/mpls_lookup.c
index 30031e51536..b13c65ddd43 100644
--- a/src/vnet/mpls/mpls_lookup.c
+++ b/src/vnet/mpls/mpls_lookup.c
@@ -103,22 +103,22 @@ mpls_lookup (vlib_main_t * vm,
/* Prefetch next iteration. */
{
- vlib_buffer_t * p2, * p3, *p4, *p5;
+ vlib_buffer_t *p4, *p5, *p6, *p7;
- p2 = vlib_get_buffer (vm, from[2]);
- p3 = vlib_get_buffer (vm, from[3]);
p4 = vlib_get_buffer (vm, from[4]);
p5 = vlib_get_buffer (vm, from[5]);
+ p6 = vlib_get_buffer (vm, from[6]);
+ p7 = vlib_get_buffer (vm, from[7]);
- vlib_prefetch_buffer_header (p2, STORE);
- vlib_prefetch_buffer_header (p3, STORE);
vlib_prefetch_buffer_header (p4, STORE);
vlib_prefetch_buffer_header (p5, STORE);
+ vlib_prefetch_buffer_header (p6, STORE);
+ vlib_prefetch_buffer_header (p7, STORE);
- CLIB_PREFETCH (p2->data, sizeof (h0[0]), STORE);
- CLIB_PREFETCH (p3->data, sizeof (h0[0]), STORE);
- CLIB_PREFETCH (p4->data, sizeof (h0[0]), STORE);
- CLIB_PREFETCH (p5->data, sizeof (h0[0]), STORE);
+ CLIB_PREFETCH (p4->data, sizeof (h0[0]), LOAD);
+ CLIB_PREFETCH (p5->data, sizeof (h0[0]), LOAD);
+ CLIB_PREFETCH (p6->data, sizeof (h0[0]), LOAD);
+ CLIB_PREFETCH (p7->data, sizeof (h0[0]), LOAD);
}
bi0 = to_next[0] = from[0];
@@ -538,8 +538,8 @@ mpls_load_balance (vlib_main_t * vm,
vlib_prefetch_buffer_header (p2, STORE);
vlib_prefetch_buffer_header (p3, STORE);
- CLIB_PREFETCH (p2->data, sizeof (mpls0[0]), STORE);
- CLIB_PREFETCH (p3->data, sizeof (mpls0[0]), STORE);
+ CLIB_PREFETCH (p2->data, sizeof (mpls0[0]), LOAD);
+ CLIB_PREFETCH (p3->data, sizeof (mpls0[0]), LOAD);
}
pi0 = to_next[0] = from[0];