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
{
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