From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 653EB2C48 for ; Fri, 18 Mar 2016 11:27:13 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 18 Mar 2016 03:27:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,354,1455004800"; d="scan'208";a="68901699" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 18 Mar 2016 03:27:12 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 18 Mar 2016 03:27:12 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 18 Mar 2016 03:27:12 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.136]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.42]) with mapi id 14.03.0248.002; Fri, 18 Mar 2016 18:27:10 +0800 From: "Xie, Huawei" To: Ilya Maximets , "dev@dpdk.org" , Yuanhan Liu CC: Dyasly Sergey , Jerin Jacob , Jianbo Liu , "Thomas Monjalon" , Tetsuya Mukawa Thread-Topic: [PATCH RFC v3 1/3] vhost: use SMP barriers instead of compiler ones. Thread-Index: AdGA/iVK8b+ddm8JQy6p0FOaeGbrKA== Date: Fri, 18 Mar 2016 10:27:09 +0000 Message-ID: References: <1456314438-4021-1-git-send-email-i.maximets@samsung.com> <1456314438-4021-2-git-send-email-i.maximets@samsung.com> <56EBD718.8010604@samsung.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 Subject: Re: [dpdk-dev] [PATCH RFC v3 1/3] vhost: use SMP barriers instead of compiler ones. 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: Fri, 18 Mar 2016 10:27:13 -0000 On 3/18/2016 6:23 PM, Ilya Maximets wrote:=0A= > On 18.03.2016 13:08, Xie, Huawei wrote:=0A= >> On 2/24/2016 7:47 PM, Ilya Maximets wrote:=0A= >>> * Wait until it's our turn to add our buffer=0A= >>> @@ -979,7 +979,7 @@ rte_vhost_dequeue_burst(struct virtio_net *dev, uin= t16_t queue_id,=0A= >>> entry_success++;=0A= >>> }=0A= >>> =0A= >>> - rte_compiler_barrier();=0A= >>> + rte_smp_rmb();=0A= >> smp_rmb()?=0A= > There is no such function 'smp_rmb' in DPDK.=0A= > But:=0A= > .../arch/arm/rte_atomic.h:#define rte_smp_rmb() rte_rmb()=0A= > .../arch/ppc_64/rte_atomic.h:#define rte_smp_rmb() rte_compiler_barrier()= =0A= > .../arch/tile/rte_atomic.h:#define rte_smp_rmb() rte_compiler_barrier()= =0A= > .../arch/x86/rte_atomic.h:#define rte_smp_rmb() rte_compiler_barrier()=0A= =0A= I mean shoudn't be rte_smp_wmb()?=0A= =0A= >=0A= >>> vq->used->idx +=3D entry_success;=0A= >>> vhost_log_used_vring(dev, vq, offsetof(struct vring_used, idx),=0A= >>> sizeof(vq->used->idx));=0A= >>> -- 2.5.0=0A= >>=0A= >>=0A= =0A=