From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id AF02E1B5A3 for ; Thu, 10 Jan 2019 10:18:54 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E1F97461D0; Thu, 10 Jan 2019 09:18:53 +0000 (UTC) Received: from [10.36.112.17] (ovpn-112-17.ams2.redhat.com [10.36.112.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9157E600C9; Thu, 10 Jan 2019 09:18:45 +0000 (UTC) To: "Gavin Hu (Arm Technology China)" , Ilya Maximets , "dev@dpdk.org" , "Michael S . Tsirkin" , Xiao Wang Cc: Tiwei Bie , Zhihong Wang , "jfreimann@redhat.com" , Jason Wang , "xiaolong.ye@intel.com" , "alejandro.lucero@netronome.com" , Honnappa Nagarahalli , "jerinj@marvell.com" , nd References: <20181226163712.31596-1-i.maximets@samsung.com> <20190109145015.3010-1-i.maximets@samsung.com> <20190109145015.3010-3-i.maximets@samsung.com> From: Maxime Coquelin Message-ID: <3fc0c642-6b4e-5d3f-4e95-f0e3f343e4e1@redhat.com> Date: Thu, 10 Jan 2019 10:18:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 10 Jan 2019 09:18:54 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v3 2/3] net/virtio: update memory ordering comment for vq notify X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 09:18:55 -0000 Hi Gavin, On 1/10/19 9:19 AM, Gavin Hu (Arm Technology China) wrote: > > >> -----Original Message----- >> From: dev On Behalf Of Ilya Maximets >> Sent: Wednesday, January 9, 2019 10:50 PM >> To: dev@dpdk.org; Maxime Coquelin ; >> Michael S . Tsirkin ; Xiao Wang >> >> Cc: Tiwei Bie ; Zhihong Wang >> ; jfreimann@redhat.com; Jason Wang >> ; xiaolong.ye@intel.com; >> alejandro.lucero@netronome.com; Ilya Maximets >> >> Subject: [dpdk-dev] [PATCH v3 2/3] net/virtio: update memory ordering >> comment for vq notify >> >> We're not using io ports in case of modern device even on IA. >> Also, this comment useless for other architectures. > > Agree, it should be architecture neutral. > >> >> Signed-off-by: Ilya Maximets >> --- >> drivers/net/virtio/virtqueue.h | 9 ++++----- >> 1 file changed, 4 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h >> index dffa03669..53aeac238 100644 >> --- a/drivers/net/virtio/virtqueue.h >> +++ b/drivers/net/virtio/virtqueue.h >> @@ -437,14 +437,13 @@ virtqueue_kick_prepare_packed(struct virtqueue >> *vq) >> return flags != RING_EVENT_FLAGS_DISABLE; >> } >> >> +/* >> + * virtqueue_kick_prepare*() or the virtio_wmb() should be called >> + * before this function to be sure that all the data is visible to vhost. >> + */ > > C11 _atomic APIs are preferred for new code, other than wmb or rmb, could you work on that? Thanks for the review. -rc2 deadline is today, so I may apply this series as is if no reply from Ilya today. If a change is agreed, it could be made on top for -rc3. Regards, Maxime >> static inline void >> virtqueue_notify(struct virtqueue *vq) >> { >> - /* >> - * Ensure updated avail->idx is visible to host. >> - * For virtio on IA, the notificaiton is through io port operation >> - * which is a serialization instruction itself. >> - */ >> VTPCI_OPS(vq->hw)->notify_queue(vq->hw, vq); >> } >> >> -- >> 2.17.1 >