Manually prefetch the first desc in dequeue path. Signed-off-by: Tiwei Bie <tiwei....@intel.com> --- lib/librte_vhost/virtio_net.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 0888d2b..08d53d9 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -1259,6 +1259,7 @@ vhost_dequeue_burst_1_1(struct virtio_net *dev, struct vhost_virtqueue *vq, vq->last_used_idx = desc_idx; if (likely(i)) { + rte_prefetch0(&desc[head_idx & (vq->size - 1)]); for (desc_idx = head_idx + 1; desc_idx != vq->last_used_idx; desc_idx++) { -- 2.7.4