From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5ADEB11C5 for ; Mon, 7 Mar 2016 07:38:47 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 06 Mar 2016 22:38:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,549,1449561600"; d="scan'208";a="928300934" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 06 Mar 2016 22:38:46 -0800 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 6 Mar 2016 22:38:45 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 6 Mar 2016 22:38:45 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.136]) by shsmsx102.ccr.corp.intel.com ([169.254.2.232]) with mapi id 14.03.0248.002; Mon, 7 Mar 2016 14:38:43 +0800 From: "Xie, Huawei" To: Yuanhan Liu Thread-Topic: [PATCH v2 3/7] vhost: refactor virtio_dev_merge_rx Thread-Index: AdF4ObcZEr+Wg2beQUS0XzDMVdLF8A== Date: Mon, 7 Mar 2016 06:38:42 +0000 Message-ID: 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> <20160307063639.GB14300@yliu-dev.sh.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "Michael S. Tsirkin" , "dev@dpdk.org" , Victor Kaplansky Subject: Re: [dpdk-dev] [PATCH v2 3/7] vhost: refactor virtio_dev_merge_rx X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 06:38:47 -0000 On 3/7/2016 2:35 PM, Yuanhan Liu wrote:=0A= > On Mon, Mar 07, 2016 at 06:22:25AM +0000, Xie, Huawei wrote:=0A= >> On 2/18/2016 9:48 PM, Yuanhan Liu wrote:=0A= >>> + uint16_t idx =3D vq->avail->ring[avail_idx & (vq->size - 1)];=0A= >>> + uint32_t vec_id =3D *vec_idx;=0A= >>> + uint32_t len =3D *allocated;=0A= >>> =0A= >> There is bug not using volatile to retrieve the avail idx.=0A= > avail_idx? This is actually from "vq->last_used_idx_res". =0A= =0A= uint16_t idx =3D vq->avail->ring[avail_idx & (vq->size - 1)]=0A= =0A= the idx retrieved from avail->ring. =0A= =0A= =0A= >=0A= > --yliu=0A= >=0A= =0A=