summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/l2')
-rw-r--r--src/vnet/l2/l2_efp_filter.c10
-rw-r--r--src/vnet/l2/l2_fib.c4
-rw-r--r--src/vnet/l2/l2_fwd.c8
-rw-r--r--src/vnet/l2/l2_in_out_acl.c4
-rw-r--r--src/vnet/l2/l2_in_out_feat_arc.c2
-rw-r--r--src/vnet/l2/l2_input_classify.c4
-rw-r--r--src/vnet/l2/l2_input_node.c8
-rw-r--r--src/vnet/l2/l2_input_vtr.c4
-rw-r--r--src/vnet/l2/l2_learn.c8
-rw-r--r--src/vnet/l2/l2_output.c8
-rw-r--r--src/vnet/l2/l2_output_classify.c4
-rw-r--r--src/vnet/l2/l2_xcrw.c4
12 files changed, 35 insertions, 33 deletions
diff --git a/src/vnet/l2/l2_efp_filter.c b/src/vnet/l2/l2_efp_filter.c
index 3d152ad1f11..ad325b83df2 100644
--- a/src/vnet/l2/l2_efp_filter.c
+++ b/src/vnet/l2/l2_efp_filter.c
@@ -227,8 +227,8 @@ VLIB_NODE_FN (l2_efp_filter_node) (vlib_main_t * vm,
vlib_prefetch_buffer_header (p4, LOAD);
vlib_prefetch_buffer_header (p5, LOAD);
- CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p4->data);
+ clib_prefetch_store (p5->data);
/*
* Prefetch the input config for the N+1 loop iteration
@@ -238,8 +238,10 @@ VLIB_NODE_FN (l2_efp_filter_node) (vlib_main_t * vm,
sw_if_index3 = vnet_buffer (p3)->sw_if_index[VLIB_TX];
/*
* $$$ TODO
- * CLIB_PREFETCH (vec_elt_at_index(l2output_main.configs, sw_if_index2), CLIB_CACHE_LINE_BYTES, LOAD);
- * CLIB_PREFETCH (vec_elt_at_index(l2output_main.configs, sw_if_index3), CLIB_CACHE_LINE_BYTES, LOAD);
+ * clib_prefetch_load (vec_elt_at_index(l2output_main.configs,
+ * sw_if_index2));
+ * clib_prefetch_load (vec_elt_at_index(l2output_main.configs,
+ * sw_if_index3));
*/
}
diff --git a/src/vnet/l2/l2_fib.c b/src/vnet/l2/l2_fib.c
index 478f6766701..d1ee82273b1 100644
--- a/src/vnet/l2/l2_fib.c
+++ b/src/vnet/l2/l2_fib.c
@@ -1131,13 +1131,13 @@ l2fib_scan (vlib_main_t * vm, f64 start_time, u8 event_only)
{
BVT (clib_bihash_bucket) * b =
BV (clib_bihash_get_bucket) (h, i + 3);
- CLIB_PREFETCH (b, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (b);
b = BV (clib_bihash_get_bucket) (h, i + 1);
if (!BV (clib_bihash_bucket_is_empty) (b))
{
BVT (clib_bihash_value) * v =
BV (clib_bihash_get_value) (h, b->offset);
- CLIB_PREFETCH (v, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (v);
}
}
diff --git a/src/vnet/l2/l2_fwd.c b/src/vnet/l2/l2_fwd.c
index e7accc29878..3414f6c490e 100644
--- a/src/vnet/l2/l2_fwd.c
+++ b/src/vnet/l2/l2_fwd.c
@@ -269,10 +269,10 @@ l2fwd_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_prefetch_buffer_header (b[6], LOAD);
vlib_prefetch_buffer_header (b[7], LOAD);
- CLIB_PREFETCH (b[4]->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (b[5]->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (b[6]->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (b[7]->data, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (b[4]->data);
+ clib_prefetch_load (b[5]->data);
+ clib_prefetch_load (b[6]->data);
+ clib_prefetch_load (b[7]->data);
}
/* RX interface handles */
diff --git a/src/vnet/l2/l2_in_out_acl.c b/src/vnet/l2/l2_in_out_acl.c
index df233672ef0..f8293c1feee 100644
--- a/src/vnet/l2/l2_in_out_acl.c
+++ b/src/vnet/l2/l2_in_out_acl.c
@@ -172,9 +172,9 @@ l2_in_out_acl_node_fn (vlib_main_t * vm,
p2 = vlib_get_buffer (vm, from[2]);
vlib_prefetch_buffer_header (p1, STORE);
- CLIB_PREFETCH (p1->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p1->data);
vlib_prefetch_buffer_header (p2, STORE);
- CLIB_PREFETCH (p2->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p2->data);
}
bi0 = from[0];
diff --git a/src/vnet/l2/l2_in_out_feat_arc.c b/src/vnet/l2/l2_in_out_feat_arc.c
index 37efa0732a5..b3b4a8cbb73 100644
--- a/src/vnet/l2/l2_in_out_feat_arc.c
+++ b/src/vnet/l2/l2_in_out_feat_arc.c
@@ -131,7 +131,7 @@ buffer_prefetch_xN (int vector_sz, vlib_buffer_t ** b)
{
int ii;
for (ii = 0; ii < vector_sz; ii++)
- CLIB_PREFETCH (b[ii], CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (b[ii]);
}
static_always_inline void
diff --git a/src/vnet/l2/l2_input_classify.c b/src/vnet/l2/l2_input_classify.c
index ffd1078d469..53d46399daf 100644
--- a/src/vnet/l2/l2_input_classify.c
+++ b/src/vnet/l2/l2_input_classify.c
@@ -190,9 +190,9 @@ VLIB_NODE_FN (l2_input_classify_node) (vlib_main_t * vm,
p3 = vlib_get_buffer (vm, from[3]);
vlib_prefetch_buffer_header (p2, STORE);
- CLIB_PREFETCH (p2->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p2->data);
vlib_prefetch_buffer_header (p3, STORE);
- CLIB_PREFETCH (p3->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p3->data);
}
bi0 = from[0];
diff --git a/src/vnet/l2/l2_input_node.c b/src/vnet/l2/l2_input_node.c
index 59a437e1b3f..3638a8aa00d 100644
--- a/src/vnet/l2/l2_input_node.c
+++ b/src/vnet/l2/l2_input_node.c
@@ -258,10 +258,10 @@ l2input_node_inline (vlib_main_t * vm,
vlib_prefetch_buffer_header (b[6], LOAD);
vlib_prefetch_buffer_header (b[7], LOAD);
- CLIB_PREFETCH (b[4]->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (b[5]->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (b[6]->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (b[7]->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (b[4]->data);
+ clib_prefetch_store (b[5]->data);
+ clib_prefetch_store (b[6]->data);
+ clib_prefetch_store (b[7]->data);
}
classify_and_dispatch (msm, b[0], &next[0]);
diff --git a/src/vnet/l2/l2_input_vtr.c b/src/vnet/l2/l2_input_vtr.c
index be3e6ba85f4..3c1235bfa32 100644
--- a/src/vnet/l2/l2_input_vtr.c
+++ b/src/vnet/l2/l2_input_vtr.c
@@ -126,8 +126,8 @@ VLIB_NODE_FN (l2_invtr_node) (vlib_main_t * vm,
vlib_prefetch_buffer_header (p4, LOAD);
vlib_prefetch_buffer_header (p5, LOAD);
- CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p4->data);
+ clib_prefetch_store (p5->data);
/*
* Prefetch the input config for the N+1 loop iteration
diff --git a/src/vnet/l2/l2_learn.c b/src/vnet/l2/l2_learn.c
index 3b9b1dbcaa9..6d90cee62a7 100644
--- a/src/vnet/l2/l2_learn.c
+++ b/src/vnet/l2/l2_learn.c
@@ -292,10 +292,10 @@ l2learn_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_prefetch_buffer_header (b[6], LOAD);
vlib_prefetch_buffer_header (b[7], LOAD);
- CLIB_PREFETCH (b[4]->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (b[5]->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (b[6]->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (b[7]->data, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (b[4]->data);
+ clib_prefetch_load (b[5]->data);
+ clib_prefetch_load (b[6]->data);
+ clib_prefetch_load (b[7]->data);
}
/* RX interface handles */
diff --git a/src/vnet/l2/l2_output.c b/src/vnet/l2/l2_output.c
index 2c472b5c702..ba40de316d1 100644
--- a/src/vnet/l2/l2_output.c
+++ b/src/vnet/l2/l2_output.c
@@ -147,10 +147,10 @@ l2output_process_batch_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
/* prefetch eth headers only if we need to touch them */
if (l2_vtr || l2_pbb || shg_set)
{
- CLIB_PREFETCH (b[4]->data + cdo[4], CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (b[5]->data + cdo[5], CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (b[6]->data + cdo[6], CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (b[7]->data + cdo[7], CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (b[4]->data + cdo[4]);
+ clib_prefetch_load (b[5]->data + cdo[5]);
+ clib_prefetch_load (b[6]->data + cdo[6]);
+ clib_prefetch_load (b[7]->data + cdo[7]);
}
if (update_feature_bitmap)
diff --git a/src/vnet/l2/l2_output_classify.c b/src/vnet/l2/l2_output_classify.c
index 1e55afcaa4d..96d0b14753a 100644
--- a/src/vnet/l2/l2_output_classify.c
+++ b/src/vnet/l2/l2_output_classify.c
@@ -183,9 +183,9 @@ VLIB_NODE_FN (l2_output_classify_node) (vlib_main_t * vm,
p3 = vlib_get_buffer (vm, from[3]);
vlib_prefetch_buffer_header (p2, STORE);
- CLIB_PREFETCH (p2->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p2->data);
vlib_prefetch_buffer_header (p3, STORE);
- CLIB_PREFETCH (p3->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p3->data);
}
bi0 = from[0];
diff --git a/src/vnet/l2/l2_xcrw.c b/src/vnet/l2/l2_xcrw.c
index 942cd118d3d..c2c325a796f 100644
--- a/src/vnet/l2/l2_xcrw.c
+++ b/src/vnet/l2/l2_xcrw.c
@@ -107,8 +107,8 @@ VLIB_NODE_FN (l2_xcrw_node) (vlib_main_t * vm,
vlib_prefetch_buffer_header (p2, LOAD);
vlib_prefetch_buffer_header (p3, LOAD);
- CLIB_PREFETCH (p2->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p3->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p2->data);
+ clib_prefetch_store (p3->data);
}
/* speculatively enqueue b0 and b1 to the current next frame */