From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v2 3/7] vhost: refactor virtio_dev_merge_rx Date: Mon, 7 Mar 2016 14:36:39 +0800 Message-ID: <20160307063639.GB14300@yliu-dev.sh.intel.com> References: <1449122773-25510-1-git-send-email-yuanhan.liu@linux.intel.com> <1455803352-5518-1-git-send-email-yuanhan.liu@linux.intel.com> <1455803352-5518-4-git-send-email-yuanhan.liu@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Michael S. Tsirkin" , "dev@dpdk.org" , Victor Kaplansky To: "Xie, Huawei" Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 5B2D411C5 for ; Mon, 7 Mar 2016 07:34:31 +0100 (CET) Content-Disposition: inline In-Reply-To: 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" On Mon, Mar 07, 2016 at 06:22:25AM +0000, Xie, Huawei wrote: > On 2/18/2016 9:48 PM, Yuanhan Liu wrote: > > + uint16_t idx = vq->avail->ring[avail_idx & (vq->size - 1)]; > > + uint32_t vec_id = *vec_idx; > > + uint32_t len = *allocated; > > > There is bug not using volatile to retrieve the avail idx. avail_idx? This is actually from "vq->last_used_idx_res". --yliu