aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShesha Sreenivasamurthy <shesha@cisco.com>2016-04-25 14:35:30 -0400
committerShesha Sreenivasamurthy <shesha@cisco.com>2016-04-25 14:38:33 -0400
commitcbdd897846aa13b2d16c3379b7344a1b830ce80e (patch)
tree47fc0881436602ed39fffc9471dd390ebc4ac221
parentd6a0fc5ea696763c3cba67dc47d8e7943ae7649b (diff)
Fix vpp crash in DBG mode
virtio-vhost driver was specifying wrong prefetch size. This caused VPP to assert in DBG mode. Change-Id: Icbe3d5574bd2463b98dfc618a001b16198ab82be Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
-rw-r--r--vnet/vnet/devices/virtio/vhost-user.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vnet/vnet/devices/virtio/vhost-user.c b/vnet/vnet/devices/virtio/vhost-user.c
index 9747b9200fe..f52de25416f 100644
--- a/vnet/vnet/devices/virtio/vhost-user.c
+++ b/vnet/vnet/devices/virtio/vhost-user.c
@@ -1216,7 +1216,8 @@ vhost_user_intfc_tx (vlib_main_t * vm,
error = VHOST_USER_TX_FUNC_ERROR_MMAP_FAIL;
goto done;
}
- CLIB_PREFETCH(buffer_addr, clib_min(rxvq->desc[desc_current].len, 500), STORE);
+ CLIB_PREFETCH(buffer_addr, clib_min(rxvq->desc[desc_current].len,
+ 4*CLIB_CACHE_LINE_BYTES), STORE);
virtio_net_hdr_mrg_rxbuf_t * hdr = (virtio_net_hdr_mrg_rxbuf_t *) buffer_addr;
hdr->hdr.flags = 0;