summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/vhost_user_input.c
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/devices/virtio/vhost_user_input.c
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/devices/virtio/vhost_user_input.c')
-rw-r--r--src/vnet/devices/virtio/vhost_user_input.c20
1 files changed, 10 insertions, 10 deletions
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);