From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: [PATCH v7 6/7] vhost: prefetch avail ring Date: Fri, 14 Oct 2016 17:34:37 +0800 Message-ID: <1476437678-7102-7-git-send-email-yuanhan.liu@linux.intel.com> References: <1474336817-22683-1-git-send-email-zhihong.wang@intel.com> <1476437678-7102-1-git-send-email-yuanhan.liu@linux.intel.com> Cc: Maxime Coquelin , Yuanhan Liu , Zhihong Wang To: dev@dpdk.org Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 984BE72FB for ; Fri, 14 Oct 2016 11:33:54 +0200 (CEST) In-Reply-To: <1476437678-7102-1-git-send-email-yuanhan.liu@linux.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Yuanhan Liu Signed-off-by: Zhihong Wang --- lib/librte_vhost/virtio_net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 2bdc2fe..12a037b 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -539,6 +539,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; -- 1.9.0