From a0de7807405963d15216f3d89ee1c6edf678946a Mon Sep 17 00:00:00 2001 From: Ray Kinsella Date: Mon, 22 Nov 2021 12:08:04 +0000 Subject: 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 Change-Id: I317af2a38ef536022e68552351a8507861f62dad --- src/plugins/dpdk/device/node.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins') 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 -- cgit 1.2.3-korg