vhost: prefetch available ring
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Signed-off-by: Zhihong Wang <zhihong.wang@intel.com> Reviewed-by: Jianbo Liu <jianbo.liu@linaro.org> Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
parent
f689586bc0
commit
45847f015d
@ -536,6 +536,8 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id,
|
||||
if (count == 0)
|
||||
return 0;
|
||||
|
||||
rte_prefetch0(&vq->avail->ring[vq->last_avail_idx & (vq->size - 1)]);
|
||||
|
||||
vq->shadow_used_idx = 0;
|
||||
for (pkt_idx = 0; pkt_idx < count; pkt_idx++) {
|
||||
uint32_t pkt_len = pkts[pkt_idx]->pkt_len + dev->vhost_hlen;
|
||||
|
Loading…
x
Reference in New Issue
Block a user