aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device
diff options
context:
space:
mode:
authorRay Kinsella <mdr@ashroe.eu>2021-11-22 12:08:04 +0000
committerRay Kinsella <mdr@ashroe.eu>2021-11-25 09:04:27 +0000
commita0de7807405963d15216f3d89ee1c6edf678946a (patch)
tree66112a4af14eab41a9753152d46d5657420c97ee /src/plugins/dpdk/device
parent2711ca710affe0c52bf63e08e0cf0588094e6198 (diff)
dpdk: prefetch becomes prefetchw
Changed dpdk-input prefetch of vlib_buffer_t to prefetchw. vlib_buffer_t was being prefetched without 'ownership', which may cause a stall when the buffer is subsequently written to. This saves 4 clocks a packet when the buffer is shared a cross cores, and has no impact when not sharing. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I317af2a38ef536022e68552351a8507861f62dad
Diffstat (limited to 'src/plugins/dpdk/device')
-rw-r--r--src/plugins/dpdk/device/node.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/dpdk/device/node.c b/src/plugins/dpdk/device/node.c
index e9615e598bc..2357e399dc8 100644
--- a/src/plugins/dpdk/device/node.c
+++ b/src/plugins/dpdk/device/node.c
@@ -97,13 +97,13 @@ dpdk_prefetch_buffer_x4 (struct rte_mbuf *mb[])
{
vlib_buffer_t *b;
b = vlib_buffer_from_rte_mbuf (mb[0]);
- clib_prefetch_load (b);
+ clib_prefetch_store (b);
b = vlib_buffer_from_rte_mbuf (mb[1]);
- clib_prefetch_load (b);
+ clib_prefetch_store (b);
b = vlib_buffer_from_rte_mbuf (mb[2]);
- clib_prefetch_load (b);
+ clib_prefetch_store (b);
b = vlib_buffer_from_rte_mbuf (mb[3]);
- clib_prefetch_load (b);
+ clib_prefetch_store (b);
}
/** \brief Main DPDK input node