From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Maximets Subject: [PATCH v3 2/3] net/virtio: update memory ordering comment for vq notify Date: Wed, 9 Jan 2019 17:50:14 +0300 Message-ID: <20190109145015.3010-3-i.maximets@samsung.com> References: <20181226163712.31596-1-i.maximets@samsung.com> <20190109145015.3010-1-i.maximets@samsung.com> Content-Type: text/plain; charset="utf-8" Cc: Tiwei Bie , Zhihong Wang , jfreimann@redhat.com, Jason Wang , xiaolong.ye@intel.com, alejandro.lucero@netronome.com, Ilya Maximets To: dev@dpdk.org, Maxime Coquelin , "Michael S . Tsirkin" , Xiao Wang Return-path: Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 1F4871B4A6 for ; Wed, 9 Jan 2019 15:50:36 +0100 (CET) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190109145035euoutp024594be5f43ada3854a6a00fe182037cc~4NaCf7jgX1813018130euoutp02i for ; Wed, 9 Jan 2019 14:50:35 +0000 (GMT) In-Reply-To: <20190109145015.3010-1-i.maximets@samsung.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" We're not using io ports in case of modern device even on IA. Also, this comment useless for other architectures. 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. + */ 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