summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-07-15 11:54:41 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2021-07-15 11:25:08 +0000
commitaf7fb04b81c765c3e3f621c6b23fc3390310715b (patch)
treefec5e2de4dc1ec64026c7339eb898797ce66fba0 /src/vnet
parent0aea808ac5cb1132b9787c8f7d5f9d995cd3413b (diff)
misc: replace CLIB_PREFETCH with clib_prefetch_{load,store}
Type: refactor Change-Id: Id10cbf52e8f2dd809080a228d8fa282308be84ac Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/bonding/device.c8
-rw-r--r--src/vnet/classify/flow_classify_node.c4
-rw-r--r--src/vnet/classify/ip_classify.c4
-rw-r--r--src/vnet/classify/vnet_classify.h4
-rw-r--r--src/vnet/devices/pipe/pipe.c4
-rw-r--r--src/vnet/devices/virtio/vhost_user_input.c20
-rw-r--r--src/vnet/devices/virtio/vhost_user_output.c8
-rw-r--r--src/vnet/dpo/lookup_dpo.c8
-rw-r--r--src/vnet/ethernet/node.c2
-rw-r--r--src/vnet/ip/icmp4.c2
-rw-r--r--src/vnet/ip/ip4_forward.c12
-rw-r--r--src/vnet/ip/ip6_forward.c4
-rw-r--r--src/vnet/ip/ip6_hop_by_hop.c12
-rw-r--r--src/vnet/ip/ip_in_out_acl.c4
-rw-r--r--src/vnet/ip/reass/ip4_sv_reass.c4
-rw-r--r--src/vnet/ipsec/esp_decrypt.c6
-rw-r--r--src/vnet/ipsec/esp_encrypt.c6
-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
-rw-r--r--src/vnet/lawful-intercept/node.c4
-rw-r--r--src/vnet/pipeline.h2
-rw-r--r--src/vnet/policer/node_funcs.c4
-rw-r--r--src/vnet/srv6/sr_localsid.c32
-rw-r--r--src/vnet/srv6/sr_policy_rewrite.c48
-rw-r--r--src/vnet/tcp/tcp_syn_filter4.c8
-rw-r--r--src/vnet/vxlan/decap.c4
36 files changed, 142 insertions, 140 deletions
diff --git a/src/vnet/bonding/device.c b/src/vnet/bonding/device.c
index 8a0c1092251..9e949b87214 100644
--- a/src/vnet/bonding/device.c
+++ b/src/vnet/bonding/device.c
@@ -416,10 +416,10 @@ bond_tx_inline (vlib_main_t * vm, bond_if_t * bif, vlib_buffer_t ** b,
vlib_prefetch_buffer_header (pb[2], LOAD);
vlib_prefetch_buffer_header (pb[3], LOAD);
- CLIB_PREFETCH (pb[0]->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (pb[1]->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (pb[2]->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (pb[3]->data, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (pb[0]->data);
+ clib_prefetch_load (pb[1]->data);
+ clib_prefetch_load (pb[2]->data);
+ clib_prefetch_load (pb[3]->data);
}
if (lb_alg == BOND_LB_L2)
diff --git a/src/vnet/classify/flow_classify_node.c b/src/vnet/classify/flow_classify_node.c
index 9462d467b70..4989bf0a012 100644
--- a/src/vnet/classify/flow_classify_node.c
+++ b/src/vnet/classify/flow_classify_node.c
@@ -97,9 +97,9 @@ flow_classify_inline (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/classify/ip_classify.c b/src/vnet/classify/ip_classify.c
index 5a5cfed6904..a5c044521bf 100644
--- a/src/vnet/classify/ip_classify.c
+++ b/src/vnet/classify/ip_classify.c
@@ -102,9 +102,9 @@ ip_classify_inline (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/classify/vnet_classify.h b/src/vnet/classify/vnet_classify.h
index fbac77c45bc..06784e0541e 100644
--- a/src/vnet/classify/vnet_classify.h
+++ b/src/vnet/classify/vnet_classify.h
@@ -328,7 +328,7 @@ vnet_classify_prefetch_bucket (vnet_classify_table_t * t, u64 hash)
bucket_index = hash & (t->nbuckets - 1);
- CLIB_PREFETCH (&t->buckets[bucket_index], CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (&t->buckets[bucket_index]);
}
static inline vnet_classify_entry_t *
@@ -389,7 +389,7 @@ vnet_classify_prefetch_entry (vnet_classify_table_t * t, u64 hash)
e = vnet_classify_entry_at_index (t, e, value_index);
- CLIB_PREFETCH (e, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (e);
}
vnet_classify_entry_t *vnet_classify_find_entry (vnet_classify_table_t * t,
diff --git a/src/vnet/devices/pipe/pipe.c b/src/vnet/devices/pipe/pipe.c
index ec50f63d9b5..eb92b3c788a 100644
--- a/src/vnet/devices/pipe/pipe.c
+++ b/src/vnet/devices/pipe/pipe.c
@@ -324,8 +324,8 @@ pipe_rx (vlib_main_t * vm,
p3 = vlib_get_buffer (vm, from[3]);
vlib_prefetch_buffer_header (p2, STORE);
vlib_prefetch_buffer_header (p3, STORE);
- CLIB_PREFETCH (p2->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (p3->data, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (p2->data);
+ clib_prefetch_load (p3->data);
}
bi0 = from[0];
diff --git a/src/vnet/devices/virtio/vhost_user_input.c b/src/vnet/devices/virtio/vhost_user_input.c
index 6abc1fc6e94..bdb3d27245b 100644
--- a/src/vnet/devices/virtio/vhost_user_input.c
+++ b/src/vnet/devices/virtio/vhost_user_input.c
@@ -163,8 +163,8 @@ vhost_user_input_copy (vhost_user_intf_t * vui, vhost_copy_t * cpy,
(!(src3 = map_guest_mem (vui, cpy[3].src, map_hint))))
return 1;
- CLIB_PREFETCH (src2, 64, LOAD);
- CLIB_PREFETCH (src3, 64, LOAD);
+ clib_prefetch_load (src2);
+ clib_prefetch_load (src3);
clib_memcpy_fast ((void *) cpy[0].dst, src0, cpy[0].len);
clib_memcpy_fast ((void *) cpy[1].dst, src1, cpy[1].len);
@@ -872,10 +872,10 @@ vhost_user_input_copy_packed (vhost_user_intf_t * vui, vhost_copy_t * cpy,
bad = (src4 == 0) + (src5 == 0) + (src6 == 0) + (src7 == 0);
if (PREDICT_FALSE (bad))
goto one_by_one;
- CLIB_PREFETCH (src4, 64, LOAD);
- CLIB_PREFETCH (src5, 64, LOAD);
- CLIB_PREFETCH (src6, 64, LOAD);
- CLIB_PREFETCH (src7, 64, LOAD);
+ clib_prefetch_load (src4);
+ clib_prefetch_load (src5);
+ clib_prefetch_load (src6);
+ clib_prefetch_load (src7);
while (PREDICT_TRUE (copy_len >= 8))
{
@@ -892,10 +892,10 @@ vhost_user_input_copy_packed (vhost_user_intf_t * vui, vhost_copy_t * cpy,
if (PREDICT_FALSE (bad))
break;
- CLIB_PREFETCH (src4, 64, LOAD);
- CLIB_PREFETCH (src5, 64, LOAD);
- CLIB_PREFETCH (src6, 64, LOAD);
- CLIB_PREFETCH (src7, 64, LOAD);
+ clib_prefetch_load (src4);
+ clib_prefetch_load (src5);
+ clib_prefetch_load (src6);
+ clib_prefetch_load (src7);
clib_memcpy_fast ((void *) cpy[0].dst, src0, cpy[0].len);
clib_memcpy_fast ((void *) cpy[1].dst, src1, cpy[1].len);
diff --git a/src/vnet/devices/virtio/vhost_user_output.c b/src/vnet/devices/virtio/vhost_user_output.c
index 59ea8104d5b..40faefadb42 100644
--- a/src/vnet/devices/virtio/vhost_user_output.c
+++ b/src/vnet/devices/virtio/vhost_user_output.c
@@ -194,8 +194,8 @@ vhost_user_tx_copy (vhost_user_intf_t * vui, vhost_copy_t * cpy,
(!(dst3 = map_guest_mem (vui, cpy[3].dst, map_hint))))
return 1;
- CLIB_PREFETCH ((void *) cpy[2].src, 64, LOAD);
- CLIB_PREFETCH ((void *) cpy[3].src, 64, LOAD);
+ clib_prefetch_load ((void *) cpy[2].src);
+ clib_prefetch_load ((void *) cpy[3].src);
clib_memcpy_fast (dst0, (void *) cpy[0].src, cpy[0].len);
clib_memcpy_fast (dst1, (void *) cpy[1].src, cpy[1].len);
@@ -601,7 +601,7 @@ retry:
buffer_map_addr += cpy->len;
desc_len += cpy->len;
- CLIB_PREFETCH (&rxvq->packed_desc, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (&rxvq->packed_desc);
/* Check if vlib buffer has more data. If not, get more or break */
if (PREDICT_TRUE (!bytes_left))
@@ -922,7 +922,7 @@ retry:
buffer_map_addr += cpy->len;
desc_len += cpy->len;
- CLIB_PREFETCH (&rxvq->desc, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (&rxvq->desc);
}
// Check if vlib buffer has more data. If not, get more or break.
diff --git a/src/vnet/dpo/lookup_dpo.c b/src/vnet/dpo/lookup_dpo.c
index 23a1285be53..3f34cefe0c4 100644
--- a/src/vnet/dpo/lookup_dpo.c
+++ b/src/vnet/dpo/lookup_dpo.c
@@ -377,8 +377,8 @@ lookup_dpo_ip4_inline (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);
}
bi0 = from[0];
@@ -734,8 +734,8 @@ lookup_dpo_ip6_inline (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);
}
bi0 = from[0];
diff --git a/src/vnet/ethernet/node.c b/src/vnet/ethernet/node.c
index f470c1c7b46..cc0a0c30b9c 100644
--- a/src/vnet/ethernet/node.c
+++ b/src/vnet/ethernet/node.c
@@ -1505,7 +1505,7 @@ ethernet_input_inline (vlib_main_t * vm,
if (n_left_from > 1)
{
vlib_prefetch_buffer_header (b[1], STORE);
- CLIB_PREFETCH (b[1]->data, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (b[1]->data);
}
bi0 = from[0];
diff --git a/src/vnet/ip/icmp4.c b/src/vnet/ip/icmp4.c
index 05262e6f8e4..0363092d5d5 100644
--- a/src/vnet/ip/icmp4.c
+++ b/src/vnet/ip/icmp4.c
@@ -176,7 +176,7 @@ ip4_icmp_input (vlib_main_t * vm,
vlib_prefetch_buffer_with_index (vm, from[2], LOAD);
p0 = vlib_get_buffer (vm, from[1]);
ip0 = vlib_buffer_get_current (p0);
- CLIB_PREFETCH (ip0, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (ip0);
}
bi0 = to_next[0] = from[0];
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index 36f05a27820..750b75ffcff 100644
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -1762,8 +1762,8 @@ ip4_local_inline (vlib_main_t * vm,
vlib_prefetch_buffer_header (b[4], LOAD);
vlib_prefetch_buffer_header (b[5], LOAD);
- CLIB_PREFETCH (b[4]->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (b[5]->data, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (b[4]->data);
+ clib_prefetch_load (b[5]->data);
}
error[0] = error[1] = IP4_ERROR_UNKNOWN_PROTOCOL;
@@ -2148,12 +2148,12 @@ ip4_rewrite_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
vnet_buffer (b[1])->ip.save_rewrite_length = rw_len1;
p = vlib_buffer_get_current (b[2]);
- CLIB_PREFETCH (p - CLIB_CACHE_LINE_BYTES, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_store (p - CLIB_CACHE_LINE_BYTES);
+ clib_prefetch_load (p);
p = vlib_buffer_get_current (b[3]);
- CLIB_PREFETCH (p - CLIB_CACHE_LINE_BYTES, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_store (p - CLIB_CACHE_LINE_BYTES);
+ clib_prefetch_load (p);
/* Check MTU of outgoing interface. */
u16 ip0_len = clib_net_to_host_u16 (ip0->length);
diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c
index fd742d6b3e2..ba616ebc7c7 100644
--- a/src/vnet/ip/ip6_forward.c
+++ b/src/vnet/ip/ip6_forward.c
@@ -1780,8 +1780,8 @@ ip6_rewrite_inline_with_gso (vlib_main_t * vm,
vlib_prefetch_buffer_header (p2, LOAD);
vlib_prefetch_buffer_header (p3, LOAD);
- CLIB_PREFETCH (p2->pre_data, 32, STORE);
- CLIB_PREFETCH (p3->pre_data, 32, STORE);
+ clib_prefetch_store (p2->pre_data);
+ clib_prefetch_store (p3->pre_data);
CLIB_PREFETCH (p2->data, sizeof (ip0[0]), STORE);
CLIB_PREFETCH (p3->data, sizeof (ip0[0]), STORE);
diff --git a/src/vnet/ip/ip6_hop_by_hop.c b/src/vnet/ip/ip6_hop_by_hop.c
index 9923b416b65..e66084c2c4d 100644
--- a/src/vnet/ip/ip6_hop_by_hop.c
+++ b/src/vnet/ip/ip6_hop_by_hop.c
@@ -620,8 +620,8 @@ VLIB_NODE_FN (ip6_pop_hop_by_hop_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 */
@@ -879,10 +879,10 @@ ip6_local_hop_by_hop_inline (vlib_main_t * vm,
vlib_prefetch_buffer_header (b[5], STORE);
vlib_prefetch_buffer_header (b[6], STORE);
vlib_prefetch_buffer_header (b[7], STORE);
- 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);
}
/*
diff --git a/src/vnet/ip/ip_in_out_acl.c b/src/vnet/ip/ip_in_out_acl.c
index 2f73e1307dc..a5e652e1ee8 100644
--- a/src/vnet/ip/ip_in_out_acl.c
+++ b/src/vnet/ip/ip_in_out_acl.c
@@ -220,8 +220,8 @@ ip_in_out_acl_inline (vlib_main_t * vm,
vlib_prefetch_buffer_header (b[4], LOAD);
vlib_prefetch_buffer_header (b[5], LOAD);
- CLIB_PREFETCH (b[4]->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (b[5]->data, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (b[4]->data);
+ clib_prefetch_load (b[5]->data);
}
/* calculate hashes for b[2] & b[3] */
diff --git a/src/vnet/ip/reass/ip4_sv_reass.c b/src/vnet/ip/reass/ip4_sv_reass.c
index 43390eae2ab..9b3f1b98558 100644
--- a/src/vnet/ip/reass/ip4_sv_reass.c
+++ b/src/vnet/ip/reass/ip4_sv_reass.c
@@ -468,8 +468,8 @@ ip4_sv_reass_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_prefetch_buffer_header (p2, LOAD);
vlib_prefetch_buffer_header (p3, LOAD);
- CLIB_PREFETCH (p2->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (p3->data, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (p2->data);
+ clib_prefetch_load (p3->data);
}
ip4_header_t *ip0 =
diff --git a/src/vnet/ipsec/esp_decrypt.c b/src/vnet/ipsec/esp_decrypt.c
index b700f2c9935..e30fc9effcb 100644
--- a/src/vnet/ipsec/esp_decrypt.c
+++ b/src/vnet/ipsec/esp_decrypt.c
@@ -1068,9 +1068,9 @@ esp_decrypt_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
u8 *p;
vlib_prefetch_buffer_header (b[2], LOAD);
p = vlib_buffer_get_current (b[1]);
- CLIB_PREFETCH (p, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (p);
p -= CLIB_CACHE_LINE_BYTES;
- CLIB_PREFETCH (p, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (p);
}
u32 n_bufs = vlib_buffer_chain_linearize (vm, b[0]);
@@ -1095,7 +1095,7 @@ esp_decrypt_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
sa0 = ipsec_sa_get (current_sa_index);
/* fetch the second cacheline ASAP */
- CLIB_PREFETCH (sa0->cacheline1, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (sa0->cacheline1);
cpd.icv_sz = sa0->integ_icv_size;
cpd.iv_sz = sa0->crypto_iv_size;
cpd.flags = sa0->flags;
diff --git a/src/vnet/ipsec/esp_encrypt.c b/src/vnet/ipsec/esp_encrypt.c
index da9c56a7e03..d102bd68f74 100644
--- a/src/vnet/ipsec/esp_encrypt.c
+++ b/src/vnet/ipsec/esp_encrypt.c
@@ -626,9 +626,9 @@ esp_encrypt_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
u8 *p;
vlib_prefetch_buffer_header (b[2], LOAD);
p = vlib_buffer_get_current (b[1]);
- CLIB_PREFETCH (p, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (p);
p -= CLIB_CACHE_LINE_BYTES;
- CLIB_PREFETCH (p, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (p);
/* speculate that the trailer goes in the first buffer */
CLIB_PREFETCH (vlib_buffer_get_tail (b[1]),
CLIB_CACHE_LINE_BYTES, LOAD);
@@ -656,7 +656,7 @@ esp_encrypt_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
sa0 = ipsec_sa_get (sa_index0);
/* fetch the second cacheline ASAP */
- CLIB_PREFETCH (sa0->cacheline1, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (sa0->cacheline1);
current_sa_index = sa_index0;
spi = clib_net_to_host_u32 (sa0->spi);
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 */
diff --git a/src/vnet/lawful-intercept/node.c b/src/vnet/lawful-intercept/node.c
index 03b507adbdd..c5328e672d0 100644
--- a/src/vnet/lawful-intercept/node.c
+++ b/src/vnet/lawful-intercept/node.c
@@ -119,8 +119,8 @@ VLIB_NODE_FN (li_hit_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 */
diff --git a/src/vnet/pipeline.h b/src/vnet/pipeline.h
index 2ac1a9ac27d..afb3c38ca57 100644
--- a/src/vnet/pipeline.h
+++ b/src/vnet/pipeline.h
@@ -75,7 +75,7 @@ generic_stage0 (vlib_main_t * vm,
vlib_node_runtime_t * node, vlib_buffer_t * b AUX_DATA_ARG)
{
vlib_prefetch_buffer_header (b, STORE);
- CLIB_PREFETCH (b->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (b->data);
}
#if NSTAGES == 2
diff --git a/src/vnet/policer/node_funcs.c b/src/vnet/policer/node_funcs.c
index c7b6e8c7585..21b9393a222 100644
--- a/src/vnet/policer/node_funcs.c
+++ b/src/vnet/policer/node_funcs.c
@@ -387,9 +387,9 @@ policer_classify_inline (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/srv6/sr_localsid.c b/src/vnet/srv6/sr_localsid.c
index 93619071ca3..a055c923be9 100644
--- a/src/vnet/srv6/sr_localsid.c
+++ b/src/vnet/srv6/sr_localsid.c
@@ -1195,10 +1195,10 @@ sr_localsid_d_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_prefetch_buffer_header (p6, LOAD);
vlib_prefetch_buffer_header (p7, LOAD);
- CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p6->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p7->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p4->data);
+ clib_prefetch_store (p5->data);
+ clib_prefetch_store (p6->data);
+ clib_prefetch_store (p7->data);
}
to_next[0] = bi0 = from[0];
@@ -1502,10 +1502,10 @@ sr_localsid_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_prefetch_buffer_header (p6, LOAD);
vlib_prefetch_buffer_header (p7, LOAD);
- CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p6->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p7->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p4->data);
+ clib_prefetch_store (p5->data);
+ clib_prefetch_store (p6->data);
+ clib_prefetch_store (p7->data);
}
to_next[0] = bi0 = from[0];
@@ -1812,10 +1812,10 @@ sr_localsid_un_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_prefetch_buffer_header (p6, LOAD);
vlib_prefetch_buffer_header (p7, LOAD);
- CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p6->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p7->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p4->data);
+ clib_prefetch_store (p5->data);
+ clib_prefetch_store (p6->data);
+ clib_prefetch_store (p7->data);
}
to_next[0] = bi0 = from[0];
@@ -2117,10 +2117,10 @@ sr_localsid_un_perf_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_prefetch_buffer_header (p6, LOAD);
vlib_prefetch_buffer_header (p7, LOAD);
- CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p6->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p7->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p4->data);
+ clib_prefetch_store (p5->data);
+ clib_prefetch_store (p6->data);
+ clib_prefetch_store (p7->data);
}
to_next[0] = bi0 = from[0];
diff --git a/src/vnet/srv6/sr_policy_rewrite.c b/src/vnet/srv6/sr_policy_rewrite.c
index 98fae3bd4a1..79de7792061 100644
--- a/src/vnet/srv6/sr_policy_rewrite.c
+++ b/src/vnet/srv6/sr_policy_rewrite.c
@@ -1307,10 +1307,10 @@ sr_policy_rewrite_encaps (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_prefetch_buffer_header (p6, LOAD);
vlib_prefetch_buffer_header (p7, LOAD);
- CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p6->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p7->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p4->data);
+ clib_prefetch_store (p5->data);
+ clib_prefetch_store (p6->data);
+ clib_prefetch_store (p7->data);
}
to_next[0] = bi0 = from[0];
@@ -1600,10 +1600,10 @@ sr_policy_rewrite_encaps_v4 (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_prefetch_buffer_header (p6, LOAD);
vlib_prefetch_buffer_header (p7, LOAD);
- CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p6->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p7->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p4->data);
+ clib_prefetch_store (p5->data);
+ clib_prefetch_store (p6->data);
+ clib_prefetch_store (p7->data);
}
to_next[0] = bi0 = from[0];
@@ -1904,10 +1904,10 @@ sr_policy_rewrite_encaps_l2 (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_prefetch_buffer_header (p6, LOAD);
vlib_prefetch_buffer_header (p7, LOAD);
- CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p6->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p7->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p4->data);
+ clib_prefetch_store (p5->data);
+ clib_prefetch_store (p6->data);
+ clib_prefetch_store (p7->data);
}
to_next[0] = bi0 = from[0];
@@ -2300,10 +2300,10 @@ sr_policy_rewrite_insert (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_prefetch_buffer_header (p6, LOAD);
vlib_prefetch_buffer_header (p7, LOAD);
- CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p6->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p7->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p4->data);
+ clib_prefetch_store (p5->data);
+ clib_prefetch_store (p6->data);
+ clib_prefetch_store (p7->data);
}
to_next[0] = bi0 = from[0];
@@ -2722,10 +2722,10 @@ sr_policy_rewrite_b_insert (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_prefetch_buffer_header (p6, LOAD);
vlib_prefetch_buffer_header (p7, LOAD);
- CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p6->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p7->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p4->data);
+ clib_prefetch_store (p5->data);
+ clib_prefetch_store (p6->data);
+ clib_prefetch_store (p7->data);
}
to_next[0] = bi0 = from[0];
@@ -3165,10 +3165,10 @@ sr_policy_rewrite_b_encaps (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_prefetch_buffer_header (p6, LOAD);
vlib_prefetch_buffer_header (p7, LOAD);
- CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p6->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p7->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p4->data);
+ clib_prefetch_store (p5->data);
+ clib_prefetch_store (p6->data);
+ clib_prefetch_store (p7->data);
}
to_next[0] = bi0 = from[0];
diff --git a/src/vnet/tcp/tcp_syn_filter4.c b/src/vnet/tcp/tcp_syn_filter4.c
index b107899cfb9..ef7a3280c03 100644
--- a/src/vnet/tcp/tcp_syn_filter4.c
+++ b/src/vnet/tcp/tcp_syn_filter4.c
@@ -135,10 +135,10 @@ VLIB_NODE_FN (syn_filter4_node) (vlib_main_t * vm,
vlib_prefetch_buffer_header (p6, LOAD);
vlib_prefetch_buffer_header (p7, LOAD);
- CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p6->data, CLIB_CACHE_LINE_BYTES, STORE);
- CLIB_PREFETCH (p7->data, CLIB_CACHE_LINE_BYTES, STORE);
+ clib_prefetch_store (p4->data);
+ clib_prefetch_store (p5->data);
+ clib_prefetch_store (p6->data);
+ clib_prefetch_store (p7->data);
}
/* speculatively enqueue b0 and b1 to the current next frame */
diff --git a/src/vnet/vxlan/decap.c b/src/vnet/vxlan/decap.c
index 2ba24d881af..729293fb3e5 100644
--- a/src/vnet/vxlan/decap.c
+++ b/src/vnet/vxlan/decap.c
@@ -249,8 +249,8 @@ vxlan_input (vlib_main_t * vm,
vxlan6_find_tunnel (vxm, &last6, fi1, ip6_1, vxlan1, &stats_if1);
/* Prefetch next iteration. */
- CLIB_PREFETCH (b[2]->data, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (b[3]->data, CLIB_CACHE_LINE_BYTES, LOAD);
+ clib_prefetch_load (b[2]->data);
+ clib_prefetch_load (b[3]->data);
u32 len0 = vlib_buffer_length_in_chain (vm, b[0]);
u32 len1 = vlib_buffer_length_in_chain (vm, b[1]);