vhost: prefetch first descriptor in dequeue path

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Tiwei Bie <tiwei.bie@intel.com>
This commit is contained in:
Maxime Coquelin 2018-07-06 09:04:48 +02:00 committed by Thomas Monjalon
parent 380a2adff3
commit c1058a6b16

View File

@ -1083,6 +1083,8 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,
vq->shadow_used_idx = 0;
}
rte_prefetch0(&vq->avail->ring[vq->last_avail_idx & (vq->size - 1)]);
/*
* Construct a RARP broadcast packet, and inject it to the "pkts"
* array, to looks like that guest actually send such packet.