From 5e0ea09d96010e99a7ce0d2f3370f0de50c46c83 Mon Sep 17 00:00:00 2001 From: Ray Kinsella Date: Mon, 22 Nov 2021 12:50:34 +0000 Subject: [PATCH] l2: change prefetch to prefetchw L2 prefetches the vlib_buffer_t and then immediately writes to l2 split horizon group. Changing to the prefetch to a prefetchw. Type: improvement Signed-off-by: Ray Kinsella Change-Id: If3b7996978ee80f99c55904692c7b3c905f537ce --- src/vnet/l2/l2_input_node.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vnet/l2/l2_input_node.c b/src/vnet/l2/l2_input_node.c index 74625b2ec99..f8dfa3641b3 100644 --- a/src/vnet/l2/l2_input_node.c +++ b/src/vnet/l2/l2_input_node.c @@ -252,10 +252,10 @@ l2input_node_inline (vlib_main_t * vm, /* Prefetch next iteration. */ { /* Prefetch the buffer header and packet for the N+2 loop iteration */ - vlib_prefetch_buffer_header (b[4], LOAD); - vlib_prefetch_buffer_header (b[5], LOAD); - vlib_prefetch_buffer_header (b[6], LOAD); - vlib_prefetch_buffer_header (b[7], LOAD); + clib_prefetch_store (b + 4); + clib_prefetch_store (b + 5); + clib_prefetch_store (b + 6); + clib_prefetch_store (b + 7); clib_prefetch_store (b[4]->data); clib_prefetch_store (b[5]->data); -- 2.16.6