From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout3.w1.samsung.com (mailout3.w1.samsung.com [210.118.77.13]) by dpdk.org (Postfix) with ESMTP id 335C6558A for ; Fri, 18 Mar 2016 11:23:23 +0100 (CET) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O48002MUCUYQZ80@mailout3.w1.samsung.com> for dev@dpdk.org; Fri, 18 Mar 2016 10:23:22 +0000 (GMT) X-AuditID: cbfec7f4-f79026d00000418a-e3-56ebd719d075 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 7F.E8.16778.917DBE65; Fri, 18 Mar 2016 10:23:21 +0000 (GMT) Received: from [106.109.129.180] by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O48006YACUWVW80@eusync2.samsung.com>; Fri, 18 Mar 2016 10:23:21 +0000 (GMT) To: "Xie, Huawei" , "dev@dpdk.org" , Yuanhan Liu References: <1456314438-4021-1-git-send-email-i.maximets@samsung.com> <1456314438-4021-2-git-send-email-i.maximets@samsung.com> Cc: Dyasly Sergey , Jerin Jacob , Jianbo Liu , Thomas Monjalon , Tetsuya Mukawa From: Ilya Maximets Message-id: <56EBD718.8010604@samsung.com> Date: Fri, 18 Mar 2016 13:23:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDLMWRmVeSWpSXmKPExsVy+t/xK7qS11+HGey+qGXx7tN2Jov2mWeZ LCZOMrGY/jTC4ljPJ1aLybOlLL5sms5mcX3CBVYHDo+L/XcYPTac6Gf1+LVgKatH43MJj8V7 XjJ53Lm2h81j3slAj74tqxgDOKK4bFJSczLLUov07RK4Mq4eW8xccIqtovvsLcYGxj2sXYyc HBICJhL3pl1jgrDFJC7cW8/WxcjFISSwlFHi/qFDTBDOC0aJBTNPg1UJCwRLbFjzhBnEFhEo kVj34i87RNFpRolNW/vBHGaBi4wSDx8eZwOpYhPQkTi1+ggjiM0roCXRcLIXbDeLgKrEyfc7 2EFsUYEIicOdXewQNYISPybfYwGxOQXCJDb/fwFkcwAN1ZO4f1ELJMwsIC+xec1b5gmMArOQ dMxCqJqFpGoBI/MqRtHU0uSC4qT0XEO94sTc4tK8dL3k/NxNjJA4+LKDcfExq0OMAhyMSjy8 L6pehwmxJpYVV+YeYpTgYFYS4Y2/ABTiTUmsrEotyo8vKs1JLT7EKM3BoiTOO3fX+xAhgfTE ktTs1NSC1CKYLBMHp1QDo0T2rfUFV9IPa7GvXxPcWfniXwDL96Kz31tM0mr7jwsqyx2aeLvl 4j1ObTvmqSlfKnK2ezpu2DHr5ScdIc3z4R+TzjfWibe56H3d4Pz0cmHsritfapeyX5p5ONnE k1dFhueQjWzSdYFH7lEL18jlKpgfzio3aZxkt1pKefbJ/TEuH5fw73L+rcRSnJFoqMVcVJwI ALSS7I5/AgAA 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:23:23 -0000 On 18.03.2016 13:08, Xie, Huawei wrote: > On 2/24/2016 7:47 PM, Ilya Maximets wrote: >> * Wait until it's our turn to add our buffer >> @@ -979,7 +979,7 @@ rte_vhost_dequeue_burst(struct virtio_net *dev, uint16_t queue_id, >> entry_success++; >> } >> >> - rte_compiler_barrier(); >> + rte_smp_rmb(); > > smp_rmb()? There is no such function 'smp_rmb' in DPDK. But: .../arch/arm/rte_atomic.h:#define rte_smp_rmb() rte_rmb() .../arch/ppc_64/rte_atomic.h:#define rte_smp_rmb() rte_compiler_barrier() .../arch/tile/rte_atomic.h:#define rte_smp_rmb() rte_compiler_barrier() .../arch/x86/rte_atomic.h:#define rte_smp_rmb() rte_compiler_barrier() > >> vq->used->idx += entry_success; >> vhost_log_used_vring(dev, vq, offsetof(struct vring_used, idx), >> sizeof(vq->used->idx)); >> -- 2.5.0 > > >