summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-10-03 17:44:24 +0200
committerFlorin Coras <florin.coras@gmail.com>2016-10-03 16:58:56 +0000
commit5499b1968e1d12b736dd3e30b8fb2b69a300128f (patch)
treecfbb7acfde238e85475fafd45891c58cb9433baa
parent11f9205c10b9d7227b0f8bc2da283917bc653274 (diff)
vhost-user: avoid branching during prefetch
Change-Id: I1f4421289b2f93b64a2470559d834717ef40e181 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--vnet/vnet/devices/virtio/vhost-user.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/vnet/vnet/devices/virtio/vhost-user.c b/vnet/vnet/devices/virtio/vhost-user.c
index 8ca8c173f27..9b0db749ee9 100644
--- a/vnet/vnet/devices/virtio/vhost-user.c
+++ b/vnet/vnet/devices/virtio/vhost-user.c
@@ -1493,8 +1493,7 @@ vhost_user_intfc_tx (vlib_main_t * vm,
}
buffer_len = desc_table[desc_index].len;
- CLIB_PREFETCH (buffer_addr,
- clib_min (buffer_len, 2 * CLIB_CACHE_LINE_BYTES), STORE);
+ CLIB_PREFETCH (buffer_addr, CLIB_CACHE_LINE_BYTES, STORE);
virtio_net_hdr_mrg_rxbuf_t *hdr =
(virtio_net_hdr_mrg_rxbuf_t *) buffer_addr;
@@ -1605,9 +1604,7 @@ vhost_user_intfc_tx (vlib_main_t * vm,
goto done;
}
buffer_len = desc_table[desc_index].len;
- CLIB_PREFETCH (buffer_addr,
- clib_min (buffer_len,
- 2 * CLIB_CACHE_LINE_BYTES), STORE);
+ CLIB_PREFETCH (buffer_addr, CLIB_CACHE_LINE_BYTES, STORE);
}
else
{